hmeEM                package:mixtools                R Documentation

_E_M _A_l_g_o_r_i_t_h_m _f_o_r _M_i_x_t_u_r_e_s-_o_f-_E_x_p_e_r_t_s

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

     Returns EM algorithm output for a mixture-of-experts model.
     Currently, this code only handles a 2-component
     mixture-of-experts, but will be extended to the general
     k-component hierarchical mixture-of-experts.

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

     hmeEM(y, x, lambda = NULL, beta = NULL, sigma = NULL, w = NULL,
           k = 2, addintercept = TRUE, epsilon = 1e-08, 
           maxit = 10000, verb = FALSE)

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

       y: An n-vector of response values.

       x: An nxp matrix of predictors.  See 'addintercept' below.

  lambda: Initial value of mixing proportions, which are modeled as an
          inverse logit function of the predictors.  Entries should sum
          to 1.   If NULL, then 'lambda' is taken as 1/'k' for each
          'x'.

    beta: Initial value of 'beta' parameters.  Should be a pxk matrix,
          where p is the number of columns of x and k is number of
          components. If NULL, then 'beta' has standard normal entries
          according to a binning method done on the data.

   sigma: A vector of standard deviations.  If NULL, then 1/'sigma'$^2$
          has random standard exponential entries according to a
          binning method done on the data.

       w: A p-vector of coefficients for the way the mixing proportions
          are modeled.  See 'lambda'.

       k: Number of components.  Currently, only 'k'=2 is accepted.

addintercept: If TRUE, a column of ones is appended to the x matrix
          before the value of p is calculated.

 epsilon: The convergence criterion.

   maxit: The maximum number of iterations.

    verb: If TRUE, then various updates are printed during each
          iteration of the algorithm.

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

     'hmeEM' returns a list of class 'mixEM' with items: 

       x: The set of predictors (which includes a column of 1's if
          'addintercept' = TRUE).

       y: The response values.

       w: The final coefficients for the functional form of the mixing
          proportions.

  lambda: An nxk matrix of the final mixing proportions.

    beta: The final regression coefficients.

   sigma: The final standard deviations. If 'arbmean' = FALSE, then
          only the smallest standard deviation is returned. See 'scale'
          below.

  loglik: The final log-likelihood.

posterior: An nxk matrix of posterior probabilities for observations.

all.loglik: A vector of each iteration's log-likelihood.

restarts: The number of times the algorithm restarted due to
          unacceptable choice of initial values.

      ft: A character vector giving the name of the function.

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

     Jacobs, R. A., Jordan, M. I., Nowlan, S. J. and Hinton, G. E.
     (1991) Adaptive Mixtures of Local Experts, _Neural Computation_
     *3(1)*, 79-87.

     McLachlan, G. J. and Peel, D. (2000) _Finite Mixture Models_, John
     Wiley & Sons, Inc.

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

     'regmixEM'

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

     ## EM output for NOdata.
      
     data(NOdata)
     attach(NOdata)
     em.out<-regmixEM(Equivalence, NO)
     hme.out<-hmeEM(Equivalence, NO, beta = em.out$beta)
     hme.out[3:7]

