Comparing the theoretical variance with a reference value
Usage
sigma2.test(x, alternative = "two.sided", var0 = 1, conf.level = 0.95)
Arguments
x
numeric vector
alternative
Alternative hypothesis for the test. Either two
sided ("two.sided"), one sided to the left
("less") or one sided to the right ("greater"). Default is "two.sided".
var0
value of reference for the variance
conf.level
confidence level
Value
Returns a list:
statistic
Value of the test statistic
parameter
degrees of freedom
p.value
p-value of the test
conf.int
confidence interval
estimate
sample variance
null.value
value of reference for the variance
alternative
Alternative hypothesis for the test
method
"One-sample Chi-squared test for given variance"
data.name
name of the data set
References
Chapter 13 (Confidence Intervals and Hypothesis Testing) from the book:
The R Software, Fundamentals of Programming and Statistical Analysis