[R] how can generate from trunceted gamma distribution in R ?

Duncan Murdoch murdoch at stats.uwo.ca
Sat Dec 12 01:20:04 CET 2009


On 11/12/2009 7:12 AM, khazaei at ceremade.dauphine.fr wrote:
> Hi, all
> How can generate a sample from truncated inverse  gamma distribution in R?

Using the inverse CDF method or rejection sampling are possible, 
depending on what your truncation is like.  If your truncation forces 
the observations far out into the tails, you need to be careful about 
rounding and underflow when using the the inverse CDF method.

Duncan Murdoch

> 
> thanks
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list