rgamma0,numeric,dual,dual-method {ADtools}R Documentation

Simulate gamma random variates

Description

Simulate gamma random variates

Usage

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

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

## S4 method for signature '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.

Note

At least one of 'shape' and 'scale' should be a dual number.


[Package ADtools version 0.5.5 Index]