Description Usage Arguments Details Value Author(s) References See Also Examples
Computes the Edgeworth expansion of either the standardized mean, the mean or the sum of i.i.d. random variables.
1 2 |
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=(S_n-n*mu)/(n*sigma^2)^(1/2), where
S_n = Y_1 + … + 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) = phi(z)*[1 + rho3/(6*n^(1/2))*H_3(z) +
rho4/(24*n)*H_4(z) + rho3^2/(72*n)*H_6(z)],
with phi denoting the density of the standard normal
distribution and rho3 and rho4 denoting
the 3rd and the 4th standardized cumulants of Y_i
respectively. H_n(x) denotes the nth 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Approximation of the mean of n iid Chi-squared(2) variables
n <- 10
df <- 2
mu <- df
sigma2 <- 2*df
rho3 <- sqrt(8/df)
rho4 <- 12/df
x <- seq(max(df-3*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 Chi-squared(2) variables is n*Chi-squared(n*2) distributed
lines(x, n*dchisq(n*x, df=n*mu), col=2)
|
Loading required package: ttutils
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.