rLambertW {LambertW} | R Documentation |
Random generation of Lambert W RV
rLambertW(n, theta = c(0, 0, 1), distname = "normal", innov = NULL, ZmUv = FALSE)
n |
number of observations |
theta |
parameter vector |
distname |
distribution |
innov |
pre-specified input. optional. |
ZmUv |
Should the mean and stand. dev. of X be chosen such that Y is a zero mean, unit variance RV. default FALSE |
If the input data is given via innov
, then the theoretical mean and standard deviation are replace by the empirical counterparts.
data vector y
Georg M. Goerg
Goerg, G.M. (2009). “Lambert W Random Variables - A new class of skewed distribution functions”. Unpublished
set.seed(1) x=rnorm(1000) skewness(x) #almost no skewness mc(x) # close to zero y=rLambertW(n=1000, c(0.5,0,1)) mom.LambertW.X.Gauss(c(0.5,0,1)) skewness(y) # high positive skewness (in theory equal to 3.70) mc(y) # also the robust measure gives a high value op=par(no.readonly=TRUE) par(mfrow=c(2,2), mar=c(2,4,3,1)) plot(x) hist(x, prob=TRUE, 15) lines(density(x)) plot(y) hist(y, prob=TRUE, 15) lines(density(y)) par(op)