M4two: Pooled central moment estimates - two-sample

Description Usage Arguments Value See Also Examples

Description

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

Usage

1
M4two(m2, m4, n_x, n_y)

Arguments

m2

naive biased variance estimate m[2] = mean(c((X - X-bar)^2, (Y - Y-bar)^2)) for vectors X and Y.

m4

naive biased fourth central moment estimate m[4] = mean(c((X - X-bar)^4, (Y - Y-bar)^4)) for vectors X and Y.

n_x

number of observations in the first group.

n_y

number of observations in the second group.

Value

Pooled estimate of a fourth central moment.

See Also

Other unbiased estimates: M2M3one, M2M3two, M2M4one, M2M4two, M2one, M2pow2one, M2pow2two, M2pow3one, M2pow3two, M2two, M3one, M3pow2one, M3pow2two, M3two, M4one, M5one, M5two, M6one, M6two

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)))
}          
M4two(m2, m4, n1, n2)

innager/edgee documentation built on May 22, 2019, 12:42 p.m.