Learn R Programming

ROOPSD (version 0.3.9)

Gamma: Gamma

Description

Gamma distribution in OOP way. Based on AbstractDist

Arguments

Super class

ROOPSD::AbstractDist -> Gamma

Active bindings

shape

[double] shape of the gamma law

scale

[double] scale of the gamma law

params

[vector] params of the gamma law

Methods

Public methods

Inherited methods


Method new()

Create a new Gamma object.

Usage

Gamma$new(shape = 0.5, scale = 1)

Arguments

shape

[double] shape parameter

scale

[double] scale parameter

Returns

A new `Gamma` object.


Method clone()

The objects of this class are cloneable with this method.

Usage

Gamma$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

See AbstractDist for generic methods

Examples

Run this code
## Generate sample
scale = 1.5
shape = 0.5
gaml = ROOPSD::Gamma$new( scale = scale , shape = shape )
X    = gaml$rvs( n = 1000 )

## And fit parameters
gaml$fit(X)

Run the code above in your browser using DataLab