pfuns: 'p()' functions for Edgeworth expansions terms

pfunsR Documentation

p() functions for Edgeworth expansions terms

Description

Calculate values of p(x) used in terms of Edgeworth expansions (EE) for a sample mean and a two-sample difference in means.

Usage

p1(x, lam)

p2(x, lam)

p3(x, lam)

p4(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

p1() is used for term 1 (2nd order expansion), p2() for term 2, and so on.

Value

A vector of the same length as x.

See Also

Fmean, Fdiff for corresponding EE values.

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(2, 5, by = 0.5)  # thicker tail
p1(x, lambdas)


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