Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

extractSECdistr

Extract the SEC error distribution from an object created by selm


Description

Given an object created by a call to selm, the function delivers the SEC distribution representing the stochastic term of the fitted model

Usage

extractSECdistr(object, name, compNames)

Arguments

object

an object of class selm or mselm, as created by selm.

name

an optional character string representing the name of the outcome distribution; if missing, a string is constructed from the object ingredients.

compNames

in the multivariate case, an optional vector of character strings with the names of the components of the error distribution; if missing, one such vector is constructed from the object ingredients.

Value

An object of class SECdistrMv or SECdistrUv, depending of the class of object.

Details

When the formula of the fitted model includes only the constant 1, the returned object represents the fitted SEC distribution. If the formula includes additional terms, the linear predictor is eliminated and the returned object corresponds to the error term of the model; hence the location parameter xi in the DP parameterization is set to zero.

The returned object can be submitted to tools available for objects created by makeSECdistr, such as summary.SECdistr, conditionalSECdistr and and so on.

See Also

Examples

data(ais)
m2 <- selm(log(Fe) ~ 1, family="ST", data=ais, fixed=list(nu=8))
f2 <- extractSECdistr(m2)
show(f2)
#
m4 <- selm(cbind(BMI, LBM) ~ 1, family="SN", data=ais)
f4 <- extractSECdistr(m4)
mean(f4)
vcov(f4)

sn

The Skew-Normal and Related Distributions Such as the Skew-t and the SUN

v2.0.0
GPL-2 | GPL-3
Authors
Adelchi Azzalini [aut, cre] (<https://orcid.org/0000-0002-7583-1269>)
Initial release
2021-03-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.