rstab(n, index, skewness=0, bigdata=F)
length(n)
is larger than 1, then
length(n)
random values are returned.
2
corresponds to the
normal,
1
to the Cauchy. Smaller values mean
longer tails.
This may be a vector or
bdVector
. Missing values (
NA
s) are allowed.
skewness
should not exceed
1
.
TRUE
, an object of type
bdVector
is returned.
Otherwise, a
vector
object is returned. This argument can be used only if the bigdata library section has been loaded.
index
or
skewness
are shorter than the sample size, their values
are re-used cyclically.
A nonlinear transformation of 2 independent uniforms is performed.
Note that there are no density, probability or quantile functions
supplied for
this distribution. The efficient computation of such values is
an open problem.
Stable distributions are of considerable mathematical interest.
Each stable distribution is the limit distribution of a suitably scaled sum
of independent and identically distributed random variables.
Statistically, they are used mostly when an example of a very long-tailed
distribution is required. For small values of
index
, the
distribution degenerates to point
mass at 0.
For details on the uniform random number generator implemented in S-PLUS,
see the
set.seed
help file.
Chambers, J. M., Mallows, C. L. and Stuck, B. W. (1976).
A Method for Simulating Stable Random Variables.
Journal of the American Statistical Association 71, 340-344.
Loéve, M. (1977).
Probability Theory I.
(fourth edition) Springer-Verlag, New York.
set.seed(0) hist(rstab(200, 1.5, .5)) #fairly long tails, positive skewness # Note -- if you repeat this many times without setting the seed, # many of the plots will show negative skewness. These stable # distributions may have outliers on either side.