kweights              package:sandwich              R Documentation

_K_e_r_n_e_l _W_e_i_g_h_t_s

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

     Kernel weights for kernel-based heteroskedasticity and
     autocorrelation consistent (HAC) covariance matrix estimators as
     introduced by Andrews (1991).

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

     kweights(x, kernel = c("Truncated", "Bartlett", "Parzen",
       "Tukey-Hanning", "Quadratic Spectral"), normalize = FALSE)

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

       x: numeric.

  kernel: a character specifying the kernel used. All kernels used are
          described in Andrews (1991).

normalize: logical. If set to 'TRUE' the kernels are normalized as
          described in Andrews (1991).

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

     Value of the kernel function at 'x'.

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

     Andrews DWK (1991), Heteroskedasticity and Autocorrelation
     Consistent Covariance Matrix Estimation. _Econometrica_, *59*,
     817-858.

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

     'kernHAC', 'weightsAndrews'

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

     curve(kweights(x, kernel = "Quadratic", normalize = TRUE),
           from = 0, to = 3.2, xlab = "x", ylab = "k(x)")
     curve(kweights(x, kernel = "Bartlett", normalize = TRUE),
           from = 0, to = 3.2, col = 2, add = TRUE)
     curve(kweights(x, kernel = "Parzen", normalize = TRUE),
           from = 0, to = 3.2, col = 3, add = TRUE)
     curve(kweights(x, kernel = "Tukey", normalize = TRUE),
           from = 0, to = 3.2, col = 4, add = TRUE)
     curve(kweights(x, kernel = "Truncated", normalize = TRUE),
           from = 0, to = 3.2, col = 5, add = TRUE)

