distribution_modelspec {tsdistributions}R Documentation

Specification of distribution model

Description

Specification of distribution model

Usage

distribution_modelspec(y, distribution = "norm", ...)

Arguments

y

a numeric vector

distribution

the type of distribution. Valid choices are norm (Normal), snorm (Skew Normal), std (Student), sstd (Skew Student), ged (Generalized Error), sged (Skew Generalized Error), nig (Normal Inverse Gaussian), gh (Generalized Hyperbolic), ghst (Generalized Hyperbolic Skew Student) and jsu (Johnson's SU).

...

not currently used

Details

All distributions are parameterized in terms of their mean (‘mu’), standard deviation ‘sigma’, skew ‘skew’ and shape ‘shape’ parameters. Additionally, for the Generalized Hyperbolic distribution, there is an extra shape parameter “lambda” arising from the GIG mixing distribution. Parameters can be fixed post initialization by setting setting specific values to the ‘value’ column in the parmatrix table and setting the ‘estimate’ variable to 0 (instead of 1).

Value

An object of class “tsdistribution.spec”.

Examples

spec <- distribution_modelspec(rnorm(1000), distribution = "gh")
# fix lambda and shape
spec$parmatrix[parameter == 'lambda', value := 30]
spec$parmatrix[parameter == 'lambda', estimate := 0]

[Package tsdistributions version 1.0.1 Index]