Description Usage Arguments Value Author(s) References Examples

Comparing the theoretical variance with a reference value

1 | ```
sigma2.test(x, alternative = "two.sided", var0 = 1, conf.level = 0.95)
``` |

`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 |

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 |

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

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

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

```
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
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.