M2pow3two: Pooled central moment estimates - two-sample

View source: R/M2pow3two.R

M2pow3twoR Documentation

Pooled central moment estimates - two-sample

Description

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

Usage

M2pow3two(m2, m3, m4, m6, n_x, n_y)

Arguments

m2

naive biased variance estimate m_2 = 1/(n_x + n_y) \sum_{i = 1}^{n_x} ((X_i - \bar{X})^2 + \sum_{i = 1}^{n_y} ((Y_i - \bar{Y})^2 for vectors X and Y.

m3

naive biased third central moment estimate m_3 = 1/(n_x + n_y) \sum_{i = 1}^{n_x} ((X_i - \bar{X})^3 + \sum_{i = 1}^{n_y} ((Y_i - \bar{Y})^3 for vectors X and Y.

m4

naive biased fourth central moment estimate m_4 = 1/(n_x + n_y) \sum_{i = 1}^{n_x} ((X_i - \bar{X})^4 + \sum_{i = 1}^{n_y} ((Y_i - \bar{Y})^4 for vectors X and Y.

m6

naive biased sixth central moment estimate m_6 = 1/(n_x + n_y) \sum_{i = 1}^{n_x} ((X_i - \bar{X})^6 + \sum_{i = 1}^{n_y} ((Y_i - \bar{Y})^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 cubed variance central moment \mu_2^3, where \mu_2 is a variance.

See Also

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

Examples

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)))
}          
M2pow3two(m2, m3, m4, m6, n1, n2)

innager/edgee documentation built on April 24, 2024, 8:14 p.m.