Re: [R] problem in generating positive stable random numbers

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Wed 31 Aug 2005 - 05:55:50 EST

"X. Cong" <xcong@stat.rice.edu> writes:

> Dear all,
>
> I am trying to use the
> rstable(n, alpha, beta, gamma = 1, delta = 0, pm = c(0, 1, 2)))
>
> function to generate positive stable random numbers. For positive stable
> distribution, beta==1 and alpha is in (0,1), which defines random variables
> with support (0, infinity). So, I used rstable(100, 0.5, 1) for an example.
> I found that this gives me some negative numbers. For example,
>
> > rstable(10, 0.5, 1)
> [1] 6.3016252 399.3659030 11.2735789 1.9550625 -0.6762333 1.6810761
> [7] 0.9091360 1.9100991 -0.7593737 24.2788471
>
> Does anybody know why this should happen?

Doesn't sound like it should...

>From where did you get rstable()? It isn't part of R itself, and
poking around shows at least three different sources for it (CircStats, fBasics, stable (Lambert/Lindsey, not on CRAN)). I seem to recall that the third one also has a distribution function which is almost, but not quite monotone.

The usual advice of taking package problems to the package maintainer applies.

-- 
   O__  ---- Peter Dalgaard             ุster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-help@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
Received on Wed Aug 31 06:05:07 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:00 EST