mixdmm                package:depmix                R Documentation

_M_i_x_t_u_r_e _o_f _d_m_m'_s _s_p_e_c_i_f_i_c_a_t_i_o_n

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

     'mixdmm' creates an object of class 'mixdmm', ie a mixture of
     'dmm''s, given a list of component models of class 'dmm'.

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

             
             mixdmm(dmm, modname=NULL, mixprop=NULL, conrows=NULL)
             ## S3 method for class 'mixdmm':
             summary(object, specs=FALSE, precision=3, se=NULL, ...)

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

     dmm: A list of 'dmm' objects to form the mixture.

 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.

 conrows: Argument 'conrows' can be used to specify general constraints
          between parameters.

 mixprop: Arugement 'mixprop' can be used to set the initial values of
          the mixing proportions of a mixture of 'dmm''s.

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

  object: An object of class 'mixdmm'.

specs,...: Internal use. Not functioning currently.

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

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

     The function 'mixdmm' can be used to define a mixture of 'dmm''s
     by providing a list of such objects as argument to this function.
     See the 'dmm' helpfile on how to use the 'conrows'  argument. Note
     that it has to be of length 'npars', ie including all parameters
     of the model and not just the mixing proportions.

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

     'mixdmm' returns an object of class 'mixdmm' which has the same
     fields as a 'dmm' object.  In addition it has the following
     fields:

  nrcomp: The number of components of the mixture model.

     mod: A list of the component models, that is a list of objects of
          class 'dmm'.

_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 'mgdmm' on defining
     multi group models. See 'generate' for generating data.

_E_x_a_m_p_l_e_s:

     # define component 1
     # all or none model with error prob in the learned state
     fixed = c(0,0,0,1,1,1,1,0,0,0,0)
     stv = c(1,1,0,0.07,0.93,0.9,0.1,0.5,0.5,0,1)
     allor <- dmm(nstates=2,itemtypes=2,fixed=fixed,stval=stv,modname="All-or-none")

     # define component 2
     # Concept identification model: learning only after an error
     st=c(1,1,0,0,0,0.5,0.5,0.5,0.25,0.25,0.8,0.2,1,0,0,1,0.25,0.375,0.375)
     # fix some parameters
     fx=rep(0,19)
     fx[8:12]=1
     fx[17:19]=1
     # add a couple of constraints
     conr1 <- rep(0,19)
     conr1[9]=1
     conr1[10]=-1
     conr2 <- rep(0,19)
     conr2[18]=1
     conr2[19]=-1
     conr3 <- rep(0,19)
     conr3[8]=1
     conr3[17]=-2
     conr=c(conr1,conr2,conr3)
     cim <- dmm(nstates=3,itemtypes=2,fixed=fx,conrows=conr,stval=st,modname="CIM")

     # define a mixture of the above component models
     mix <- mixdmm(dmm=list(allor,cim),modname="MixAllCim")
     summary(mix)

