On Thu, 26 Jan 2006, Taka Matzmoto wrote: > Hi R users > > I like to generate random numbers from the logit-normal distribution.
which is not a standard distribution. I guess you mean a random variable whose logit is normal (but that is not the only meaning in use). > Are there available simple commands I can use? > > I used to generate using > > exp(rnorm(1000,0,1))/(1+exp(rnorm(1000,0,1))) That would be incorrect. I think you mean > xx <- rnorm(1000, 0, 1) > exp(xx)/(1+exp(xx)) > I am looking for a simple command such as rnorm(). > plogis(rnorm(1000)) And if that is not simple enough for you, you can write a function wrapper like > rlgnorm <- function(...) plogis(rnorm(...)) -- Brian D. Ripley, [EMAIL PROTECTED] 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 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
