Tim:
Thanks for the clarification. I misinterpreted the user's question: it
seems that he really wants to generate random variables. But the referenced
paper claims to have solved the negative density issue.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
Jeffrey Wang Research Scientist
Insightful Corp. (206) 802-2269
-----Original Message-----
From: Tim Hesterberg
Sent: Monday, June 10, 2002 10:57 AM
To: Jeffrey Wang
Subject: Re: [S] a gaussian with skewness and kurtosis?
> The Gram-Charlier expansion (around a Gaussian density) can be
>used to obtain a distribution with arbitrary skewness and
>kurtosis. For a recent application in finance, please see:
>
>Jondeau, E., and Rockinger, M. (2001): Gram-Charlier Densities,
>Journal of Economic Dynamics and Control, 25, 1457-1483.
>
> To answer the original poster's question: I am not aware of
>any S-Plus functions to do this. However, a related method, the SNP
>approach proposed by Gallant and Tauchen, is now available in
>S-Plus. If anyone is interested, I will be happy to share the code.
I don't believe that Gram-Charlier expansions are suitable for this.
They are useful for getting approximations to densities or cumulative
distribution functions, given moments like skewness and kurtosis.
However, the user wants to generate random numbers. To try to
use GC to generate random numbers, you'd have to generate random
uniforms, then solve for the values of the CDF that gives those uniforms.
That is slow. And complicated by the facts that
* the GC expansions give negative densities and non-monotone CDF
estimates, so solutions are not uniquely determined
* for uniform deviates near zero or 1 there may be no solution.
Cornish-Fisher expansions are an easier approach.
|