| sigmaTestMenu | R Documentation |
Within the "Statistics" -> "Variances" menu, a entry is provided for calculate confidence intervals and make contrasts on variance in a normal population.
This option uses the function sigma.test of the package TeachingDemos.
For more information see sigma.test.
sigmaTestMenu()
Here is an example of "Single-Sample Variance Test..." menu entry.
Load data "BJsales" selecting from Rcmdr menu: "Data" -> "Data in packages" -> "Read data set from an attached package..." then double-click on "datasets", click on "BJsales" and on "OK".
Rcmdr reply with the following command in source pane (R Script)
data(BJsales, package="datasets")
BJsales <- as.data.frame(BJsales)
To build a confidence interval for sigma on variable x, select from Rcmdr menu: "Statistics" -> "Variances" -> "Single-sample Variance Test..." select "x".
Enter 500 in the "Null hypothesis sigma0^2" field to test the hypothesis that the population variance is 500, and click OK.
Rcmdr reply with the following command in source pane (R Script)
with(na.omit(BJsales), sigma.test(x, alternative='two.sided', sigmasq=500, conf.level=0.95))
And the result shown in the Output panel is
One sample Chi-squared test for variance data: x X-squared = 137.49, df = 149, p-value = 0.5184 alternative hypothesis: true variance is not equal to 500 95 percent confidence interval: 372.2253 587.0738 sample estimates: var of x 461.3769
Manuel Munoz-Marquez <manuel.munoz@uca.es>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.