aldvmm.mm {aldvmm}R Documentation

Creating Design Matrices

Description

aldvmm.mm creates a list of two design matrices, one of the model of component distributions ("beta") and one of the model of probabilities of component membership ("delta").

Usage

aldvmm.mm(mf, Formula, ncmp, lcoef)

Arguments

mf

a data frame created by model.frame including the variables used in formula supplied to aldvmm plus additional attributes, including an object of class "terms" derived from 'formula'.

Formula

an object of class "Formula" created by Formula based on the formula supplied to aldvmm.

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'.

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").

Details

aldvmm.mm uses model.matrix to create design matrices for models of component distributions ("beta") and probabilities of component membership ("delta") based on a "Formula" object created by Formula and a model frame created by model.frame. The design matrix for probabilities of group membership is only created if more than one components are specified in 'ncmp'.

Value

a named list of numeric matrices.

beta

a numeric design matrix for the model of component distributions.

delta

a numeric design matrix of the multinomial logit model of probabilities of component membership.


[Package aldvmm version 0.8.8 Index]