Learn R Programming

babsim.hospital (version 11.8.8)

rtgamma: rtgamma

Description

Random generation for the shifted and truncated Gamma distribution with parameters shape and scale.

Usage

rtgamma(n = 1, shape = 1, rate = 1, shift = 0, alpha = 0.95)

Arguments

n

number of observations

shape

Gamma shape parameter

rate

Gamma rate parameter

shift

shift parameter.

alpha

upper quantile of gamma distribution. All values above alpha are truncated.

Value

rtgamma generates random deviates. The length of the result is determined by n.

Examples

Run this code
# NOT RUN {
rtgamma(n = 1, shape = 1, rate = 1, shift = 1, alpha = 0.95)
# }

Run the code above in your browser using DataLab