uM2M4pool: Pooled central moment estimates - two-sample

Description Usage Arguments Value See Also Examples

View source: R/M2M4two.R

Description

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

Usage

1
uM2M4pool(m2, m3, m4, m6, 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.

m3

naive biased third central moment estimate m[3] = mean(c((X - X-bar)^3, (Y - Y-bar)^3)) 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.

m6

naive biased sixth central moment estimate m[6] = mean(c((X - X-bar)^6, (Y - Y-bar)^6)) 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 product of second and fourth central moments μ[2] μ[4], where μ[2] and μ[4] are second and fourth central moments respectively.

See Also

Other pooled estimates (two-sample): uM2M3pool, uM2pool, uM2pow2pool, uM2pow3pool, uM3pool, uM3pow2pool, uM4pool, uM5pool, uM6pool

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
nx <- 10
ny <- 8
shp <- 3
smpx <- rgamma(nx, shape = shp) - shp
smpy <- rgamma(ny, shape = shp)
mx <- mean(smpx)
my <- mean(smpy)
m  <- numeric(6)
for (j in 2:6) {
  m[j] <- mean(c((smpx - mx)^j, (smpy - my)^j))
}
uM2M4pool(m[2], m[3], m[4], m[6], nx, ny)

Umoments documentation built on March 26, 2020, 7:18 p.m.