edgeworth {EQL}  R Documentation 
Computes the Edgeworth expansion of either the standardized mean, the mean or the sum of i.i.d. random variables.
edgeworth(x, n, rho3, rho4, mu, sigma2, deg=3,
type = c("standardized", "mean", "sum"))
x 
a numeric vector or array giving the values at which the approximation should be evaluated. 
n 
a positive integer giving the number of i.i.d. random variables in the sum. 
rho3 
a numeric value giving the standardized 3rd cumulant. May
be missing if 
rho4 
a numeric value giving the standardized 4th cumulant. May
be missing if 
mu 
a numeric value giving the mean. May be missing if 
sigma2 
a positive numeric value giving the variance. May be missing if 
deg 
an integer value giving the order of the approximation:

type 
determines which sum should be approximated. Must be one of (“standardized”, “mean”, “sum”), representing the shifted and scaled sum, the weighted sum and the raw sum. Can be abbreviated. 
The Edgeworth approximation (EA) for the density of the
standardized mean Z=\frac{S_nn\mu}
{\sqrt{n\sigma^2}}
, where
S_n = Y_1 + \ldots + Y_n
denotes the sum of i.i.d. random
variables,
\mu
denotes the expected value of Y_i
,
\sigma^2
denotes the variance of Y_i
is given by:
f_{Z}(s)=\varphi(s)[ 1 + \frac{\rho_3}{6\sqrt{n}} H_3(s) +
\frac{\rho_4}{24n} H_4(s) + \frac{\rho_3^2}{72n} H_6(s)],
with \varphi
denoting the density of the standard normal
distribution and \rho_3
and \rho_4
denoting
the 3rd and the 4th standardized cumulants of Y_i
respectively. H_n(x)
denotes the n
th Hermite polynomial (see
hermite
for details).
The EA for the mean and the sum can be obtained by applying
the transformation theorem for densities. In this case, the expected
value mu
and the variance sigma2
must be given to allow
for an appropriate transformation.
edgeworth
returns an object of the class
approximation
. See approximation
for further
details.
Thorn Thaler
Reid, N. (1991). Approximations and Asymptotics. Statistical Theory and Modelling, London: Chapman and Hall.
approximation
,hermite
,saddlepoint
# Approximation of the mean of n iid Chisquared(2) variables
n < 10
df < 2
mu < df
sigma2 < 2*df
rho3 < sqrt(8/df)
rho4 < 12/df
x < seq(max(df3*sqrt(2*df/n),0), df+3*sqrt(2*df/n), length=1000)
ea < edgeworth(x, n, rho3, rho4, mu, sigma2, type="mean")
plot(ea, lwd=2)
# Mean of n Chisquared(2) variables is n*Chisquared(n*2) distributed
lines(x, n*dchisq(n*x, df=n*mu), col=2)