popsd: Population Standard Deviation

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Returns the population standard deviation of x

Usage

1
popsd(x, nomiss = 0.8)

Arguments

x

A numeric vector

nomiss

A numeric between .00 and 1.00 specifying the proporiton of valid cases in x (i.e. data that must not be NA) for the sd to be returned

Details

R's built-in sd function divides the sum of the squared deviations from the mean by the number of observations minus 1 (N-1). However, there are times where one would prefer to use the formula with N in the denominator (e.g. if one is working with the entire population of scores). This function does just that.

Value

This function returns the population standard deviation.

Author(s)

Ryne A. Sherman

See Also

sd

Examples

1
2
3
x  <- rnorm(100, mean = 12, sd = 10)
sd(x) #sample standard deviation
popsd(x) #population standard deviation 

Example output

Loading required package: psych
Loading required package: abind
Loading required package: foreach
[1] 9.146893
[1] 9.101044

multicon documentation built on May 2, 2019, 3:18 a.m.