Estep              package:HiddenMarkov              R Documentation

_E _S_t_e_p _o_f _E_M _A_l_g_o_r_i_t_h_m

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

     Performs the _expectation_ step of the EM algorithm for a 'dthmm'
     process. This function is called by the 'BaumWelch' function. The
     Baum-Welch algorithm referred to in the HMM literature is a
     version of the EM algorithm.

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

     Estep(x, Pi, delta, distn, pm, pn = NULL)

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

       x: is a vector of length n containing the observed process.

      Pi: is the current estimate of the m times m transition
          probability matrix of the hidden Markov chain.

   distn: is a character string with the distribution name, e.g.
          '"norm"' or '"pois"'. If the distribution is specified as
          '"wxyz"' then a probability (or density) function called
          '"dwxyz"' should be available, in the standard R format (e.g.
          'dnorm' or 'dpois').

      pm: is a list object containing the current (Markov dependent)
          parameter estimates associated with the distribution of the
          observed process (see 'dthmm').

      pn: is a list object containing the observation dependent
          parameter values associated with the distribution of the
          observed process (see 'dthmm').

   delta: is the current estimate of the marginal probability
          distribution of the m hidden states.

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

     Let u_{ij} be one if C_i=j and zero otherwise. Further, let
     v_{ijk} be one if C_{i-1}=j and C_i=k, and zero otherwise. Let
     X^{(n)} contain the complete observed process. Then, given the
     current model parameter estimates, the returned value 'u[i,j]' is

 widehat{u}_{ij} = mbox{E}[u_{ij} , | , X^{(n)}] = Pr{C_i=j , | , X^{(n)} = x^{(n)} } ,,

     and 'v[i,j,k]' is

 widehat{v}_{ijk} = mbox{E}[v_{ijk} , | , X^{(n)}] = Pr{C_{i-1}=j, C_i=k , | , X^{(n)} = x^{(n)} },,

     where j,k = 1, cdots, m and i = 1, cdots, n.

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

     A 'list' object is returned with the following components. 

       u: an n times m matrix containing estimates of the conditional
          expectations. See "Details".

       v: an n times m times m array containing estimates of the
          conditional expectations. See "Details".

      LL: the current value of the log-likelihood.

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

     The algorithm has been taken from Zucchini (2005).

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

     Zucchini, W. (2005). _Hidden Markov Models Short Course, 3-4 April
     2005._ Macquarie University, Sydney.

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

     'BaumWelch', 'Mstep'

