vartest {intRvals}R Documentation

F Test to compare two variances of objects of class intRvals

Description

Performs an F test to compare the variances of objects of class intRvals

Usage

vartest(
  x,
  y,
  ratio = 1,
  alternative = c("two.sided", "less", "greater"),
  conf.level = 0.95
)

Arguments

x

an object of class intRvals, usually a result of a call to estinterval

y

an (optional) object of class intRvals, usually a result of a call to estinterval

ratio

the hypothesized ratio of the population variances of x and y.

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.

conf.level

confidence level for the returned confidence interval

Details

The null hypothesis is that the ratio of the variances of the data to which the models x and y were fitted, is equal to ratio.

Value

A list with class "htest" containing the same components as in var.test

Examples

data(goosedrop)
dr=estinterval(goosedrop$interval)
# split the interval data into two periods
data.beforeMay=goosedrop[goosedrop$date<as.POSIXct('2013-05-01'),]
data.afterMay=goosedrop[goosedrop$date>as.POSIXct('2013-05-01'),]
dr.beforeMay=estinterval(data.beforeMay$interval)
dr.afterMay=estinterval(data.afterMay$interval)
# perform an F test
vartest(dr.beforeMay,dr.afterMay)


[Package intRvals version 1.0.1 Index]