Var.test {PairedData} | R Documentation |
Tests of variance(s) for normal distribution(s)
Description
Classical tests of variance for one-sample, two-independent samples or paired samples.
Usage
## Default S3 method:
Var.test(x, y = NULL, ratio = 1, alternative = c("two.sided",
"less", "greater"), paired = FALSE, conf.level = 0.95, ...)
## S3 method for class 'paired'
Var.test(x, ...)
## Default S3 method:
pitman.morgan.test(x, y = NULL, alternative = c("two.sided", "less", "greater"),
ratio = 1, conf.level = 0.95,...)
Arguments
x |
first sample or an object of class paired or an object of class lm. |
y |
second sample or an object of class lm. |
ratio |
a priori ratio of variances (two-samples) or variance (one-sample). |
alternative |
alternative hypothesis. |
paired |
independent (the default) or paired samples. |
conf.level |
confidence level. |
... |
further arguments to be passed to or from methods. |
Value
A list with class "htest" containing the following components:
statistic |
the value of the X-squared statistic (one-sample) or F-statistic (two-samples). |
parameter |
the degrees of freedom for the statistic. |
p.value |
the p-value for the test. |
conf.int |
a confidence interval for the parameter appropriate to the specified alternative hypothesis. |
estimate |
the estimated variance(s). |
null.value |
the specified hypothesized value of the parameter. |
alternative |
a character string describing the alternative hypothesis. |
method |
a character string indicating what type of test was performed. |
data.name |
a character string giving the name(s) of the data. |
Author(s)
Stephane CHAMPELY
References
Morgan, W.A. (1939) A test for the significance of the difference between two variances in a sample from a normal bivariate distribution. Biometrika, 31, 13-19.
Pitman, E.J.G. (1939) A note on normal correlation. Biometrika, 31, 9-12.
See Also
bonettseier.Var.test, grambsch.Var.test
Examples
data(HorseBeginners)
#one sample test
Var.test(HorseBeginners$Actual,ratio=15)
# two independent samples test
Var.test(HorseBeginners$Actual,HorseBeginners$Imaginary)
# two dependent samples test
Var.test(HorseBeginners$Actual,HorseBeginners$Imaginary,paired=TRUE)
p<-with(HorseBeginners,paired(Actual,Imaginary))
Var.test(p)