Learn R Programming

ROOPSD (version 0.3.9)

GPD: GPD

Description

GPD distribution in OOP way. Based on AbstractDist

Arguments

Super class

ROOPSD::AbstractDist -> GPD

Active bindings

loc

[double] location of the GPD law, fixed

scale

[double] scale of the GPD law

shape

[double] shape of the GPD law

params

[vector] params of the GPD law

Methods

Inherited methods


Method new()

Create a new GPD object.

Usage

GPD$new(loc = 0, scale = 1, shape = -0.1)

Arguments

loc

[double] location parameter

scale

[double] scale parameter

shape

[double] shape parameter

Returns

A new `GPD` object.


Method fit()

Fit method

Usage

GPD$fit(Y, loc = NULL)

Arguments

Y

[vector] Dataset to infer the histogram

loc

[double] location parameter, if NULL used min(Y)

Returns

`self`


Method clone()

The objects of this class are cloneable with this method.

Usage

GPD$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

See AbstractDist for generic methods

Examples

Run this code
## Generate sample
loc   = 0
scale = 0.5
shape = -0.3
gpd = ROOPSD::GPD$new( loc = loc , scale = scale , shape = shape )
X   = gpd$rvs( n = 1000 )

## And fit parameters
gpd$fit( X , loc = 0 )

Run the code above in your browser using DataLab