| M2two | R Documentation |
Calculate pooled unbiased estimates of central moments and their powers and products.
M2two(m2, n_x, n_y)
m2 |
naive biased variance estimate |
n_x |
number of observations in the first group. |
n_y |
number of observations in the second group. |
Pooled variance estimate.
Other unbiased estimates:
M2M3one(),
M2M3two(),
M2M4one(),
M2M4two(),
M2one(),
M2pow2one(),
M2pow2two(),
M2pow3one(),
M2pow3two(),
M3one(),
M3pow2one(),
M3pow2two(),
M3two(),
M4one(),
M4two(),
M5one(),
M5two(),
M6one(),
M6two()
n1 <- 10
n2 <- 8
shp <- 3
smp1 <- rgamma(n1, shape = shp) - shp
smp2 <- rgamma(n2, shape = shp)
for (j in 2:6) {
assign(paste("m", j, sep = ""),
mean(c((smp1 - mean(smp1))^j, (smp2 - mean(smp2))^j)))
}
M2two(m2, n1, n2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.