qfuns: 'q()' functions for Edgeworth expansion terms - short version

qfunsR Documentation

q() functions for Edgeworth expansion terms - short version

Description

Calculate values of q(x) used in terms of Edgeworth expansions (EE) for ordinary one-sample t-statistic.

Usage

q1s(x, lam)

q2s(x, lam)

q3s(x, lam)

q4s(x, lam)

Arguments

x

numeric vector of quantiles of sampling distribution.

lam

a vector of scaled cumulants or their estimates, starting with 3rd (skewness). Term 1 needs a third cumulant only, term 2 - third and fourth (kurtosis), and so on.

Details

These functions implement a short version of EE, which can be used for ordinary one-sample t-statistic. q1s() is used for term 1 (1-term expansion is also referred to as a 2nd order expansion), q2s() for term 2, and so on. They do not include variance adjustment r^2, which is equal to 1 for a t-statistic with naive biased variance estimate and (n - 1)/n for a standard t with unbiased variance estimate. For the latter, use q1s(x/r), q2s(x/r), etc.

Value

A vector of the same length as x.

See Also

Ftshort for corresponding EE values and qgen for the general version of t-statistic as well as for other test statistics. For automated generalized verions of these functions see makeQx and makeFx.

Examples

# Gamma distribution with shape parameter shp
shp <- 3
ord <- 3:6                  # orders of scaled cumulants
lambdas <- factorial(ord - 1)/shp^((ord - 2)/2)
x <- seq(-5, -2, by = 0.5)  # thicker tail
q1s(x, lambdas)


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