[R] extension of rnormp package

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jul 24 07:39:05 CEST 2007


On Mon, 23 Jul 2007, Iwona Szyd?owska wrote:

> Hello,

> I would like to ask You, how to generate random numbers from an 
> exponential power family with a shape parameter p less than 1(p->0). I 
> found the rnormp package, which can generate numbers from this 
> distribution, but only for parameter less or equal 1.

It seems you mean package 'normalp', and that the package author believes 
that the exponential power distribution is only defined for p >= 1 
(although that is not on the help page). Other authors believe it is 
defined by a relationship to the gamma for all p > 0. So all you need to 
do is to change the condition from p < 1 to p <= 0 in rnormp and friends.

However, the algorithms used are not adequate for large or small p.  We 
know that the distribution tends to uniform for p -> Inf, but pnormp and 
rnormp break down for quite modest values of p.  As p -> 0 it tends to a 
point distribution at 0, but you will see very large values far too often.
So if you want p smaller than say 0.01 you will need to implement a 
different algorithm.

>
> Regards,
>            Iwona Szydlowska
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list