Generate random variable from truncated gamma

rtgamma(size, shape_, rate_, a, b)

Arguments

size

A number, size of the random variable.

shape_

A number, shape of the truncated gamma.

rate_

A number, rate of the truncated gamma.

a

lower bound of the range

b

upper bound of the range

Value

A vector, iid samples from \( Ga_{[a,b]}(shape\_,rate\_) \)