Re: [R] Simulating a variable following an arbitrary distribution

About this list Date view Thread view Subject view Author view Attachment view

From: Edgar Acuna (edgar@cs.uprm.edu)
Date: Mon 02 Jun 2003 - 09:56:33 EST


Message-id: <Pine.GSO.4.33.0306011951320.7437-100000@cs.uprm.edu>

Hi,
Use the Inverse transformation method. See any basic Cbook in simulation
for instance Sheldon Ross's book.
Regards,
Edgar

On Mon, 2 Jun 2003, Fernando Henrique Ferraz Pereira da Rosa wrote:

> 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,
>
> --
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:52 EST