smoother                package:sspir                R Documentation

_K_a_l_m_a_n _s_m_o_o_t_h_e_r _f_o_r _G_a_u_s_s_i_a_n _s_t_a_t_e _s_p_a_c_e _m_o_d_e_l

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

     Based on the output from 'kfilter', this function runs the Kalman
     smoother to produce the conditional means and variances of the
     state vectors given all observations.

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

     smoother(ss)

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

      ss: object of class 'SS', where the components 'm' and 'C' have
          been set by the 'kfilter'.

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

     The Kalman smoother yields the distribution

                  (theta_t|y[,1:n]) ~ N(m*_t, C*_t)

     through the backward recursion for t=n..1,

              R_{t+1}= G_{t+1}  C_t  G_{t+1}^T + W_{t+1}


                  B_t = C_t  G_{t+1}^T  R_{t+1}^{-1}


             m*_t = m_t + B_t  ( m*_{t+1} - G_{t+1}  m_t)


            C*_t = C_t + B_t  ( C*_{t+1} - R_{t+1} ) B_t^T

     where the matrices F, G, V, W are stored in the 'SS' object as
     functions, eg. 'Fmat(tt,x,phi)', see 'SS'. The vectors m and
     matrices C are set by the 'kfilter' and are overwritten by the
     Kalman smoother.

     The smoother also calculates the signal, mu_t = F^T_t m*_t.

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

     An object of class 'SS' with the components 'm', 'C', and 'mu'
     updated.

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

     Claus Dethlefsen and Sren Lundbye-Christensen.

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

     'SS', 'kfilter'

