sandwich              package:sandwich              R Documentation

_M_a_k_i_n_g _S_a_n_d_w_i_c_h_e_s _w_i_t_h _B_r_e_a_d _a_n_d _M_e_a_t

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

     Constructing sandwich covariance matrix estimators by multiplying
     bread and meat matrices.

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

     sandwich(x, bread. = bread, meat. = meat, ...)

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

       x: a fitted model object.

  bread.: either a bread matrix or a function for computing this via
          'bread.(x)'.

   meat.: either a bread matrix or a function for computing this via
          'meat.(x, ...)'.

     ...: arguments passed to the 'meat' function.

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

     'sandwich' is a simple convenience function that takes a bread
     matrix (i.e., estimator of the expectation of the negative
     derivative of the estimating functions) and a meat matrix (i.e.,
     estimator of the variance of the estimating functions) and
     multiplies them to a sandwich with meat between two slices of
     bread. By default 'bread' and 'meat' are called. 

     Some theoretical background along with implementation details is
     given in Zeileis (2006).

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

     A matrix containing the sandwich covariance matrix estimate.
     Typically, this should be an k x k matrix corresponding to k
     parameters.

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

     Zeileis A (2006), Object-oriented Computation of Sandwich
     Estimators. _Journal of Statistical Software_, *16*(9), 1-16. URL
     <URL: http://www.jstatsoft.org/v16/i09/>.

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

     'bread', 'meat', 'meatHC', 'meatHAC'

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

     x <- sin(1:10)
     y <- rnorm(10)
     fm <- lm(y ~ x)

     sandwich(fm)
     vcovHC(fm, type = "HC")

