uM2pow2: Unbiased central moment estimates

Description Usage Arguments Value See Also Examples

View source: R/unbmom1.R

Description

Calculate unbiased estimates of central moments and their powers and products.

Usage

1
uM2pow2(m2, m4, n)

Arguments

m2

naive biased variance estimate m[2] = mean((X - X-bar)^2) for a vector X.

m4

naive biased fourth central moment estimate m[4] = mean((X - X-bar)^4) for a vector X.

n

sample size.

Value

Unbiased estimate of squared variance μ[2]^2, where μ[2] is a variance.

See Also

Other unbiased estimates (one-sample): uM2M3, uM2M4, uM2pow3, uM2, uM3pow2, uM3, uM4, uM5, uM6

Examples

1
2
3
4
5
6
7
n <- 10
smp <- rgamma(n, shape = 3)
m <- mean(smp)
for (j in 2:4) {
  m <- c(m, mean((smp - m[1])^j))
}
uM2pow2(m[2], m[4], n)

innager/Umoments documentation built on June 24, 2021, 8:23 p.m.