var.psData | R Documentation |
An S3 method for computing the variance of clothing survey for the number of groups or size of groups
## S3 method for class 'psData'
var(x, ...)
x |
an object of class |
... |
other arguments which are passed to |
the mean of the data. If there are r_i
observations of
the value n_i
then the variance is computed by
\mathrm{E}[X^2]-\mathrm{E}[X]^2
, where
\mathrm{E}[X]
is computed using
\sum_i\frac{r_i\times
n_i}{\sum_i{r_i}}
, and
\mathrm{E}[X^2]
is computed by
\sum_i\frac{r_i\times
n_i^2}{\sum_i{r_i}}
. We realise that the
computational formula,
\mathrm{E}[X^2]-\mathrm{E}[X]^2
, is usually not
regarded as computationally stable, but the magnitude of the numbers
involved is such that, that this is not likely to cause an issue.
data(Psurveys)
var(Psurveys$roux)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.