Ftshort: Standalone Edgeworth expansion for ordinary one-sample...

FtshortR Documentation

Standalone Edgeworth expansion for ordinary one-sample t-statistic

Description

Calculate values of 1 - 4-term Edgeworth expansions (EE) (2nd - 5th order) for ordinary one-sample t-statistic (short version).

Usage

Ft1(x, n, lam, r = sqrt((n - 1)/n), norm = TRUE, df = n - 1)

Ft2(x, n, lam, r = sqrt((n - 1)/n), norm = TRUE, df = n - 1)

Ft3(x, n, lam, r = sqrt((n - 1)/n), norm = TRUE, df = n - 1)

Ft4(x, n, lam, r = sqrt((n - 1)/n), norm = TRUE, df = n - 1)

Arguments

x

numeric vector of quantiles of sampling distribution.

n

sample size.

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.

r

square root of variance adjustment (see "Details").

norm

if TRUE, normal distribution is used as a base for Edgeworth expansions, if FALSE - Student's t-distribution. Defaults to TRUE.

df

degrees of freedom for Student's t-distribution if norm = FALSE. A single value for the first order approximation (zero term).

Details

Higher-order approximations of the cumulative distribution function of a t-statistic. These functions implement a short version of EE that can be used for ordinary one-sample t-statistic. Note that in this case the variance adjustment r^2 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.

Value

A vector of the same length as x containing the values of Edgeworth expansion of a corresponding order (Ft1 for a 1-term or 2nd order EE, Ft2 for a 2-term EE, and so on).

See Also

qfuns for q() functions used in EE terms and Ftgen for a general version of EE. For creating EE as a simple function of x, see makeFx.

Examples

# Gamma distribution with shape parameter shp
n <- 10
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
Ft1(x, n, lambdas, r = 1)
Ft1(x, n, lambdas, norm = FALSE)


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