aldvmm.getpar {aldvmm}R Documentation

Extracting Parameters from Parameter Vector into Nested List.

Description

aldvmm.getpar() extracts parameters from parameter vectors into nested lists.

Usage

aldvmm.getpar(par, lcoef, lcmp, lcpar, ncmp)

Arguments

par

a named numeric vector of parameter values.

lcoef

a character vector of length 2 with labels of objects including regression coefficients of component distributions (default "beta") and coefficients of probabilities of component membership (default "delta").

lcmp

a character value representing a stub (default "Comp") for labeling objects including regression coefficients in different components (e.g. "Comp1", "Comp2", ...). This label is also used in summary tables returned by summary.aldvmm.

lcpar

a character vector with the labels of objects including constant parameters of component distributions (e.g. the standard deviation of the normal distribution). The length of 'lcpar' depends on the distribution supplied to 'dist'.

ncmp

a numeric value of the number of components that are mixed. The default value is 2. A value of 1 represents a tobit model with a gap between 1 and the maximum value in 'psi'.

Details

aldvmm.getpar identifies parameters that belong to coefficients of component distributions (label "beta"), coefficients of the multinomial logit model of probabilities of component membership (label "delta"), constant parameters of component distributions (label "lnsigma" for dist=="normal"), and 1:K components (labels "Comp1" ... "CompK")) based on parameter names generated by aldvmm.getnames.

Value

a named nested list with parameter vectors for "beta", "delta" and "lnsigma" within all 1:K components. The names of the list correspond to the labels in 'lcoef', 'lcpar' and 'lcmp'.


[Package aldvmm version 0.8.4 Index]