mgdmm                 package:depmix                 R Documentation

_M_u_l_t_i _g_r_o_u_p _m_o_d_e_l _s_p_e_c_i_f_i_c_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

_m_g_d_m_m '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.

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

 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 'trans'ition
          parameters, 'obser'vation parameters and 'init'ial 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'.

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

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

_A_u_t_h_o_r(_s):

     Ingmar Visser i.visser@uva.nl

_S_e_e _A_l_s_o:

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

_E_x_a_m_p_l_e_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)

