% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/rTrunkInvGamma.R \name{rTrunkInvGamma} \alias{rTrunkInvGamma} \title{rTrunkInvGamma generates a truncated invarse gamma random variable by rejection sampling method. If there is too many rejections, then it generates approximate sample according to two steps. initially it tries to get approximate numerical cdf of the truncated invarse gamma random variable using the functions "Gammad" and "Truncate" defined in the r package "distr". If the truncation is too acuate to use the approximation by the package "distr" then a discrete approximation is used to sample from the random variable.} \usage{ rTrunkInvGamma(alpha, beta, l = 0, u = Inf, Max_rejection = 1000, partition = 10) } \arguments{ \item{alpha}{= shape parameter} \item{beta}{= scale parameter} \item{partition}{: once the approximate sampler based on the package "distr" fails then a discrete approximate sampler is applied. log of the partion ( in base 10) is the precession of the discrete approximation. If precission upto 3 decimal places is desired then use partion=100. Default value of partition is 10} \item{l=}{lower truncation} \item{u=upper}{truncation} \item{Max_rejection=}{once the Max_rejection number of rejections occurs it stops the rejection sampler and calls the approximate sampler based on the package "distr"} } \description{ rTrunkInvGamma generates a truncated invarse gamma random variable by rejection sampling method. If there is too many rejections, then it generates approximate sample according to two steps. initially it tries to get approximate numerical cdf of the truncated invarse gamma random variable using the functions "Gammad" and "Truncate" defined in the r package "distr". If the truncation is too acuate to use the approximation by the package "distr" then a discrete approximation is used to sample from the random variable. }