Hi,
I'm attempting to compute the robust standard errors for a weighted linear
regression. HCCM() only takes an un-weighted regression model. So, I'm
trying to compute the robust standard errors "directly". I'm comparing my
results to STATA, which computes the HC1 version of the HCCM automatically
for weighted linear regression. The following is my equation:
HC1 = N/(N-K)*inv(X'X)*(X'diag[e_i^2]X)*inv(X'X)
However, I'm not sure how to include the "weighted" part into the
calculation as there is nothing in the above equation that holds the
information about the weights of each observation.
I tried multiplying X by w, the vector of weights. This takes the standard
errors closer to what STATA produces, but I'm not sure if this is valid.
So, how would I incorporate the 'weighting' part of regression into the
heteroscedastic consistent covariance matrix?
Thanks,
John.
Show replies by date