Learn R Programming

ADtools (version 0.5.4)

rgamma0,numeric,dual,dual-method: Simulate gamma random variates

Description

Simulate gamma random variates

Usage

# S4 method for numeric,dual,dual
rgamma0(n, shape, scale, method = "inv_tf")

# S4 method for numeric,dual,numeric rgamma0(n, shape, scale, method = "inv_tf")

# S4 method for numeric,numeric,dual rgamma0(n, shape, scale, method = "inv_tf")

Arguments

n

Positive integer; the number of samples.

shape

A dual number or a scalar; the shape of the gamma distribution.

scale

A dual number or a scalar; the scale of the gamma distribution.

method

'base' or 'inv_tf'; 'base' refers to `stats::rgamma` while 'inv_tf' refers to inverse transform.