Compute sample variance

Share:

Description

svar computes a sample variance.

Usage

1
svar(x, na.rm = TRUE)

Arguments

x

a numeric vector

na.rm

missing values (NA) will be stripped before the computation proceeds (na.rm = TRUE, default)

Value

Return a numeric containing a sample variance.

Author(s)

Yasuyuki Okumura
Department of Social Psychiatry,
National Institute of Mental Health,
National Center of Neurology and Psychiatry
yokumura@blue.zero.jp

See Also

r2cov, svar, ssd, ssd2sd, lower2R

Examples

1
2
3
data(infert)
svar(infert$age)    #sample variance
var(infert$age)     #unbiased variance

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.