mmlcrclassify             package:mmlcr             R Documentation

_C_l_a_s_s_i_f_i_c_a_t_i_o_n _o_f _I_n_d_i_v_i_d_u_a_l_s _b_y _M_o_d_a_l _P_o_s_t_e_r_i_o_r _P_r_o_b_a_b_i_l_i_t_i_e_s

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

     This function gives a latent class classification for each
     individual by giving the class to which the individual has the
     highest posterior probabilities.

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

     mmlcrclassify(object)

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

  object: an 'mmlcrObject'.

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

     a data.frame with row.names equal to the ids and with a single
     column giving the classification

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

     'mmlcrObject', 'mmlcr'

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

     ## Not run: 
     data(mmlcrdf)

     mmlcrdf.mmlcr2 <- mmlcr(outer =  ~ sex + cov1 | id, 
     components = list(
             list(formula = resp1 ~ 1, class = "cnormonce", min = 0, max = 50),
             list(formula = resp2 ~ poly(age, 2) + tcov1, class = "poislong"),
             list(formula = resp3 ~ poly(age, 2), class = "multinomlong")
     ), data = mmlcrdf, n.groups = 2)

     mmlcrclassify(mmlcrdf.mmlcr2)## End(Not run)

