kfuns2: 'k()' functions for Edgeworth expansions - two-sample

kfuns2R Documentation

k() functions for Edgeworth expansions - two-sample

Description

Calculate k's (cumulant components) for a general version of Edgeworth expansions (EE) for two-sample t-statistic.

Usage

K12two(
  A,
  B_x,
  B_y,
  b_x,
  b_y,
  mu_x2,
  mu_x3,
  mu_x4,
  mu_x5,
  mu_x6,
  mu_y2,
  mu_y3,
  mu_y4,
  mu_y5,
  mu_y6
)

K13two(
  A,
  B_x,
  B_y,
  b_x,
  b_y,
  mu_x2,
  mu_x3,
  mu_x4,
  mu_x5,
  mu_x6,
  mu_y2,
  mu_y3,
  mu_y4,
  mu_y5,
  mu_y6
)

K21two(
  A,
  B_x,
  B_y,
  b_x,
  b_y,
  mu_x2,
  mu_x3,
  mu_x4,
  mu_x5,
  mu_x6,
  mu_y2,
  mu_y3,
  mu_y4,
  mu_y5,
  mu_y6
)

K22two(
  A,
  B_x,
  B_y,
  b_x,
  b_y,
  mu_x2,
  mu_x3,
  mu_x4,
  mu_x5,
  mu_x6,
  mu_y2,
  mu_y3,
  mu_y4,
  mu_y5,
  mu_y6
)

K23two(
  A,
  B_x,
  B_y,
  b_x,
  b_y,
  mu_x2,
  mu_x3,
  mu_x4,
  mu_x5,
  mu_x6,
  mu_y2,
  mu_y3,
  mu_y4,
  mu_y5,
  mu_y6
)

K31two(
  A,
  B_x,
  B_y,
  b_x,
  b_y,
  mu_x2,
  mu_x3,
  mu_x4,
  mu_x5,
  mu_x6,
  mu_y2,
  mu_y3,
  mu_y4,
  mu_y5,
  mu_y6
)

K32two(
  A,
  B_x,
  B_y,
  b_x,
  b_y,
  mu_x2,
  mu_x3,
  mu_x4,
  mu_x5,
  mu_x6,
  mu_y2,
  mu_y3,
  mu_y4,
  mu_y5,
  mu_y6
)

K41two(
  A,
  B_x,
  B_y,
  b_x,
  b_y,
  mu_x2,
  mu_x3,
  mu_x4,
  mu_x5,
  mu_x6,
  mu_y2,
  mu_y3,
  mu_y4,
  mu_y5,
  mu_y6
)

K42two(
  A,
  B_x,
  B_y,
  b_x,
  b_y,
  mu_x2,
  mu_x3,
  mu_x4,
  mu_x5,
  mu_x6,
  mu_y2,
  mu_y3,
  mu_y4,
  mu_y5,
  mu_y6
)

K51two(
  A,
  B_x,
  B_y,
  b_x,
  b_y,
  mu_x2,
  mu_x3,
  mu_x4,
  mu_x5,
  mu_x6,
  mu_y2,
  mu_y3,
  mu_y4,
  mu_y5,
  mu_y6
)

K61two(
  A,
  B_x,
  B_y,
  b_x,
  b_y,
  mu_x2,
  mu_x3,
  mu_x4,
  mu_x5,
  mu_x6,
  mu_y2,
  mu_y3,
  mu_y4,
  mu_y5,
  mu_y6
)

Arguments

A

value of A.

B_x

value of B_x (depends on the type of the test).

B_y

value of B_y (depends on the type of the test).

b_x

value of b_x - equal to n/n_x, where n = (n_x + n_y)/2.

b_y

value of b_y - equal to n/n_y, where n = (n_x + n_y)/2.

mu_x2, mu_x3, mu_x4, mu_x5, mu_x6

central moments (2 - 6) for a treatment group or their estimates.

mu_y2, mu_y3, mu_y4, mu_y5, mu_y6

central moments (2 - 6) for a control group or their estimates.

Details

Note that the test statistic for this Edgeworth expansion is defined as \sqrt{n}(\bar{X} - \bar{Y})/s and therefore X would normally represent a treatment group and Y - control group. Variance adjustment r^2 is equal to the output of K21two(), unless different variance estimates are used for A, numerator of k, and r.

Value

A calculated value for a respective component.

See Also

Other k() functions: kfuns1

Examples

n1 <- 10
n2 <- 8
smp <- c(rgamma(n1, shape = 3), rnorm(n2))
a <- rep(1:0, c(n1, n2))
stats <- smpStats(smp, a, type = "Welch")
vars <- names(stats)  # if want to remove carryover names
names(stats) <- NULL                   
for (j in 1:length(stats)) {
  assign(vars[j], stats[j])
}
K32two(A, B_x, B_y, b_x, b_y, mu_x2, mu_x3, mu_x4, mu_x5, mu_x6, 
                              mu_y2, mu_y3, mu_y4, mu_y5, mu_y6)

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