mgdmm {depmix}R Documentation

Multi group model specification

Description

mgdmm creates an object of class mgd, a multi-group model, from a given model of either class dmm or class mixdmm or lists of these.

Usage


	mgdmm(dmm,ng=1,modname=NULL,trans=FALSE,obser=FALSE,init=FALSE,conpat=NULL)
	## S3 method for class 'mgd'
summary(object, specs=FALSE, precision=3, se=NULL, ...)
	

Arguments

modname

A character string with the name of the model, good when fitting many models. Components of mixture models keep their own names. Names are printed in the summary. Boring default names are provided.

dmm

Object (or list of objects) of class dmm; see details below.

ng

Number of groups for a multigroup model.

trans, obser, init

Logical arguments specify whether transition parameters, observation parameters and initial state parameters should be estimated equal across groups.

conpat

Can be used to specify general linear constraints. See dmm for details.

precision

Precision sets the number of digits to be printed in the summary functions.

se

Vector with standard errors, these are passed on from the summary.fit function if and when ses are available.

specs, ...

Internal use.

object

An object of class mgd.

Details

The function mgdmm can be used to define an mgd-model or multi group dmm. Its default behavior is to create ng copies of the dmm argument, thereby providing identical starting values for each group's model. If the dmm argument is a list of models of length ng, the starting values of those models will be used instead. This may save quite some cpu time when fitting large models by providing the parameter values of separately fitted models as starting values. Currently, depmix does not automatically generate starting values for multi group models.

Value

mgdmm returns an object of class mgd which contains all the fields of an object of class dmm and the following extra:

ng

ng is the number of groups in the multigroup model.

mixmod

mixmod is a list of length ng of mixdmm models for each group.

itemtypes

See above.

npars, freepars, pars, fixed, A, bl, bu

The same as above but now for the combined model, here npars equals the sum of npars of the component models plus the mixing proportions.

Author(s)

Ingmar Visser i.visser@uva.nl

See Also

dmm on defining single component models, and mixdmm for defining mixtures of dmm's.

Examples


# create a 2 state model with one continuous and one binary response
# with start values provided in st
st <- c(1,0.9,0.1,0.2,0.8,2,1,0.7,0.3,5,2,0.2,0.8,0.5,0.5)
mod <- dmm(nsta=2,itemt=c(1,2), stval=st)

# define 3-group model with equal transition parameters, and no 
# equalities between the obser parameters
mgr <- mgdmm(dmm=mod,ng=3,trans=TRUE,obser=FALSE)
summary(mgr)


[Package depmix version 0.9.16 Index]