pfuns | R Documentation |
p()
functions for Edgeworth expansions termsCalculate values of p(x)
used in terms of Edgeworth expansions (EE)
for a sample mean and a two-sample difference in means.
p1(x, lam)
p2(x, lam)
p3(x, lam)
p4(x, lam)
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. |
p1()
is used for term 1 (2nd order expansion), p2()
for term 2,
and so on.
A vector of the same length as x
.
Fmean
, Fdiff
for corresponding EE
values.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.