Skip to content

Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?

7 messages · Hadley Wickham, zhijie zhang, Yihui Xie +2 more

#
Hi,

Certainly it's possible. Use any distribution function as long as you
can change its skewness and kurtosis, e.g. the Chi-square
distribution. The corresponding R functions are p*, q*, d*, and r* - I
think you know these functions already (e.g. rchisq()).

The only thing that you should be clear about is the relationship
between the arguments of distribution functions in R and those in a
certain theoretical distribution. Refer to
http://en.wikipedia.org/wiki/Probability_distribution if you don't
remember those formulae for skewness and kurtosis.

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China
On Tue, Sep 23, 2008 at 10:59 PM, zhijie zhang <epistat at gmail.com> wrote:
#
On Tue, Sep 23, 2008 at 9:59 AM, zhijie zhang <epistat at gmail.com> wrote:
You might want to have a look at Pearson's type IV distribution.  This
document, http://www-cdf.fnal.gov/publications/cdf6820_pearson4.pdf,
provides a pretty good introduction, and I think you can use the
method of moments in reverse to fix the first four moments (~mean, sd,
skewness, kurtosis) and then derive the appropriate parameters of the
Pearson's distribution.

Hadley
#
Well, let's take the Beta distribution for example. See
http://en.wikipedia.org/wiki/Beta_distribution for the formulae of
skewness and kurtosis. We can fix the skewness at, say, 2 and let
alpha = 1, then solve beta from the equation of "skewness = 2", you
will get beta =
1.8164966 or 0.1835034 approximately. Then you may compute the
kurtosis and find different beta values will lead to different
kurtosis values (-0.7315651 and 2.139547 respectively). Is this
example clear enough? Only need a little bit mathematical computation.

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China
On Wed, Sep 24, 2008 at 8:21 AM, zhijie zhang <epistat at gmail.com> wrote:
#
Check out JohnsonFit in SuppDists.
On Tue, Sep 23, 2008 at 10:59 AM, zhijie zhang <epistat at gmail.com> wrote:
#
And here is one way of using JohnsonFit to display how a distribution changes with changes in the moments:

library(TeachingDemos)
library(SuppDists)

tmpfun <- function(m1=0,m2=1,m3=-0.2,m4=3.7, xmin=-3, xmax=3){
        parms <- JohnsonFit( c(m1,m2,m3,m4), 'use')
        plot(function(x) dJohnson(x,parms), xmin, xmax)
}

tmplst <- list( Parameters=list(
        m1=list('slider', init=0, from=-1, to=1, resolution=0.1),
        m2=list('slider', init=1, from=0 , to=3, resolution=0.1),
        m3=list('slider', init=-0.2, from=-1, to=1, resolution=0.1),
        m4=list('slider', init=3.7, from=0 , to=10, resolution=0.5)),
        xmin=list('numentry', init=-3, width=5),
        xmax=list('numentry', init=3 , width=5) )

tkexamp( tmpfun, tmplst, plotloc='left' )


of course assuming that you have SuppDists and TeachingDemos packages installed, play around with this (and possibly change parameters and/or limits in tmplst) before demoing it as there are many combinations of the parameters that cause errors.


--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111