Skip to content
Back to formatted view

Raw Message

Message-ID: <8531.1054509729@www61.gmx.net>
Date: 2003-06-01T23:22:09Z
From: Fernando Henrique Ferraz P. da Rosa
Subject: Simulating a variable following an arbitrary distribution

Hi, I'd like to know if there's anything in R that could help me do
that. Let's suppose I have a density function of a random variable, for example
f(x) = (x^3)/4 0 < x < 2 and I would like to simulate it. For the common
distributions (exponencial, gamma, cauchy) there are the r-functions (rgamma,
rexp, runif, rcauchy, and so on).. But when the variable I want to simulate is
not one of those, how should I procede? I read some references on the subject
and saw that there are some algorithms that can do that, but I just wonder if
there is any implemented in R?

Thank you,

--