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.}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, ...)
dmm
;
see details below.trans
ition parameters, obser
vation parameters and
init
ial state parameters should be estimated equal across
groups.dmm
for details.mgd
.mgdmm
returns an object of class mgd
which contains all the
fields of an object of class dmm
and the following extra:ng
is the number of groups in the multigroup model.mixmod
is a list of length ng
of mixdmm
models for each group.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.dmm
on defining single component models, and
mixdmm
for defining mixtures of dmm
's.# 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)
Run the code above in your browser using DataLab