moment2param {param2moment}R Documentation

Moment to Parameters: A Batch Process

Description

Converts multiple sets of moments to multiple sets of distribution parameters.

Usage

moment2param(distname, FUN = paste0("moment2", distname), ...)

Arguments

distname

character scalar, distribution name. Currently supported are 'GH' for Tukey g-&-h distribution, 'sn' for skew-normal distribution and 'st' for skew-t distribution

FUN

name or character scalar, (name of) function used to solve the distribution parameters from moments. Default is paste0('moment2', distname), e.g., moment2GH will be used for distname = 'GH'. To use one of the educational functions, specify FUN = moment2GH_g_demo or FUN = 'moment2GH_g_demo'.

...

numeric scalars, some or all of mean, sd, skewness and kurtosis (length will be recycled).

Value

Function moment2param returns a list of numeric vectors.

Examples

skw = c(.2, .5, .8)
krt = c(.5, 1, 1.5)
moment2param(distname = 'GH', skewness = skw, kurtosis = krt)
moment2param(distname = 'st', skewness = skw, kurtosis = krt)


[Package param2moment version 0.1.2 Index]