I would like to replicate the coefficients and standard errors obtained from the regression reg y x [aw=inv_w] by using the explanation used here: https://www.stata.com/support/faqs/s...ar-regression/
I attach a very simple minimal example, where I first calculate weights to balance a male covariate across two samples, and then I run a weighted regression using analytical weights.
I followed the first part of the explanation and I manage to obtain the same OLS coefficients, but I am not sure how to get the same standard errors (I am not sure what n_bar is in (1), and how exactly to use it to get identical standard errors).
Any help is very much appreciated,
SL
I attach a very simple minimal example, where I first calculate weights to balance a male covariate across two samples, and then I run a weighted regression using analytical weights.
I followed the first part of the explanation and I manage to obtain the same OLS coefficients, but I am not sure how to get the same standard errors (I am not sure what n_bar is in (1), and how exactly to use it to get identical standard errors).
Any help is very much appreciated,
SL
Comment