stepwise                package:mimR                R Documentation

_S_t_e_p_w_i_s_e _m_o_d_e_l _s_e_l_e_c_t_i_o_n _i_n _M_I_M

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

     Functions to do stepwise model selection in MIM to achieve a new
     model object.

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

     stepwise(x, arg = NULL, critlevel=NULL, infconstant=NULL)

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

       x: A mimModel object

     arg: Stepwise options to MIM

critlevel: Set the critical level for the model selection. Default is
          0.05

infconstant: Penalizing parameter used when model selection in based on
          information criteria, see 'details' below.

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

     Setting arg to contain "A" leads to model selection by AIC, i.e.
     the model with the smallest value of -2log Q - 2 * p is choosen.
     With BIC, the model with the smallest value of  -2log Q - log(n) *
     p is chosen. Setting infconstant to some value k AND setting arg
     to contains "A" will lead to selecting the model  with the
     smallest value of  -2log Q - k * p.

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

     a mimModel 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:

     data(carcass)
     gmd.carc <- as.gmData(carcass)

     m.main <- fit(mim(".",  data=gmd.carc))
     m.sat  <- fit(mim("..",  data=gmd.carc))

     m.main <- mim(".",  data=gmd.carc)
     m.sat  <- mim("..",  data=gmd.carc)

     m.m <- stepwise(m.main, "f")    # forward
     m.s <- stepwise(m.sat, "s")     # backward, exact tests

