surveyplanning (version 0.6)

s2: Population variance

Description

The function to estimate population variance $S^2$.

Usage

s2(y, w)

Arguments

Value

Population variance $S^2$ or the estimate of population variance $s^2$.

Details

If w is not defined, the result is equal to the result of the function var.

Examples

Run this code
s2(1:10)
s2(1:10, rep(1:2, each = 5))
all.equal(s2(1:10), var(1:10))

Run the code above in your browser using DataLab