Description Usage Arguments Details Value Author(s) References Examples
rCornishFisher
simulate
observations based on Cornish-Fisher quantile expansion
given mean, standard deviation, skewness and excess
kurtosis.
dCornishFisher
Computes
Cornish-Fisher density from two term Edgeworth expansion
given mean, standard deviation, skewness and excess
kurtosis.
pCornishFisher
Computes
Cornish-Fisher CDF from two term Edgeworth expansion
given mean, standard deviation, skewness and excess
kurtosis.
qCornishFisher
Computes
Cornish-Fisher quantiles from two term Edgeworth
expansion given mean, standard deviation, skewness and
excess kurtosis.
1 2 3 4 5 6 7 | dCornishFisher(x, n, skew, ekurt)
pCornishFisher(q, n, skew, ekurt)
qCornishFisher(p, n, skew, ekurt)
rCornishFisher(n, sigma, skew, ekurt, seed = NULL)
|
n |
Scalar, number of simulated values in rCornishFisher. Sample length in density,distribution,quantile function. |
sigma |
Scalar, standard deviation. |
skew |
Scalar, skewness. |
ekurt |
Scalar, excess kurtosis. |
seed |
Set seed here. Default is |
x,q |
Vector of standardized quantiles. See detail. |
p |
Vector of probabilities. |
CDF(q) = Pr(sqrt(n)*(x_bar-mu)/sigma < q)
n Simulated values from Cornish-Fisher distribution.
Eric Zivot and Yi-An Chen.
A.DasGupta, "Asymptotic Theory of Statistics and Probability", Springer Science+Business Media,LLC 2008
Thomas A.Severini, "Likelihood Methods in Statistics", Oxford University Press, 2000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
# generate 1000 observation from Cornish-Fisher distribution
rc <- rCornishFisher(1000,1,0,5)
hist(rc,breaks=100,freq=FALSE,main="simulation of Cornish Fisher Distribution",
xlim=c(-10,10))
lines(seq(-10,10,0.1),dnorm(seq(-10,10,0.1),mean=0,sd=1),col=2)
# compare with standard normal curve
# example from A.dasGupta p.188 exponential example
# x is iid exp(1) distribution, sample size = 5
# then x_bar is Gamma(shape=5,scale=1/5) distribution
q <- c(0,0.4,1,2)
# exact cdf
pgamma(q/sqrt(5)+1,shape=5,scale=1/5)
# use CLT
pnorm(q)
# use edgeworth expansion
pCornishFisher(q,n=5,skew=2,ekurt=6)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.