MIMfit                 package:mimR                 R Documentation

_F_u_n_c_t_i_o_n _t_o _f_i_t _m_o_d_e_l _i_n _M_I_M

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

     Fits model in MIM either directly or using an EM-algorithm in the
     case of incomplete data

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

     fit(object, arg=NULL)

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

  object: A mim model object

     arg: Additional MIM arguments controlling the fitting algorithm

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

     The S option enables the user to supply start values for the
     missing data: as with the R option these are used to calculate the
     sufficient statistics, and thence the initial parameter estimates.
     First start values are entered, and then these are overwritten 
     with an asterix (missing value). For an example of how to do this,
     see the examples below.

     The start values can be entered using EditData in MIM: first enter
     the desired value, and then overwrite this with an asterix
     (missing value). Check using Print E in MIM that the values have
     been correctly entered.

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

     Returns a fitted mim object

_N_o_t_e:

     Before using mimR, make sure that the MIM program is runnning.

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

     Sren Hjsgaard, sorenh@agrsci.dk

_R_e_f_e_r_e_n_c_e_s:

     David Edwards, An Introduction to Graphical Modelling, Springer
     Verlag, 2002

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

     ## Not run: 
     data(math)
     math$L   <- factor(NA, levels=1:2)
     gmd.math <- as.gmData(math)
     latent(gmd.math) <- "L"
     m1  <- mim("..", data=gmd.math, fit=FALSE)
     m2  <- editmim(m1, deleteEdge=paste(names(math)[1:5],collapse=':')) 
     m2f <- fit(m2)
     imputeMissing()
     d.imp <- retrieveData()
     ## End(Not run)

