Learn R Programming

BiG (version 0.1.0)

qtruncgamma: Truncated Gamma distribution

Description

Quantile function and random generation for truncated Gamma distribution with parameters shape and rate.

Usage

qtruncgamma(p, a = -Inf, b = Inf, shape, rate = 1)

rtruncgamma(n, a = -Inf, b = Inf, shape, rate = 1)

Arguments

p

vector of probabilities.

a

vector of lower bounds. These may be -Inf.

b

vector of upper bounds. These may be Inf.

shape, rate

shape and rate parameters. Must be positive, rate strictly.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

Examples

Run this code
# NOT RUN {
qtruncgamma(0.6,1,2,2,1)
rtruncgamma(5,1,2,2,1)
# }

Run the code above in your browser using DataLab