One approach is to sample from a non-truncated inverse gamma, then if the 
observation is in the part you want truncated, throw it away and generate a new 
value.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111


> -----Original Message-----
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of khaz...@ceremade.dauphine.fr
> Sent: Friday, December 11, 2009 5:12 AM
> To: r-help@r-project.org
> Subject: [R] how can generate from trunceted gamma distribution in R ?
> 
> 
> Hi, all
> How can generate a sample from truncated inverse  gamma distribution in
> R?
> 
> thanks
> 
> ______________________________________________
> R-help@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.

______________________________________________
R-help@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.

Reply via email to