sigma2.test: Test of a variance

Description Usage Arguments Value Author(s) References Examples

Description

Comparing the theoretical variance with a reference value

Usage

1
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

Author(s)

Lafaye de Micheaux Pierre <lafaye@unsw.edu.au>, Remy Drouilhet <Remy.Drouilhet@upmf-grenoble.fr>, Liquet Benoit <b.liquet@uq.edu.au>

References

Chapter 13 (Confidence Intervals and Hypothesis Testing) from the book: The R Software, Fundamentals of Programming and Statistical Analysis

Examples

1
2
data(NUTRIELDERLY)
sigma2.test(NUTRIELDERLY$weight,conf.level=0.9)$conf

Example output

Loading required package: xtable
Loading required package: RColorBrewer
Loading required package: gdata
gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.

gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.

Attaching package: 'gdata'

The following object is masked from 'package:stats':

    nobs

The following object is masked from 'package:utils':

    object.size

The following object is masked from 'package:base':

    startsWith

Loading required package: IndependenceTests
[1] 124.8330 170.3277
attr(,"conf.level")
[1] 0.9

TRSbook documentation built on May 2, 2019, 2:45 a.m.

Related to sigma2.test in TRSbook...