Hi Statalist,
I'm trying to estimate the effects of a given program on the knowledge of a recently passed law.
Since I do not have a treatment and control group with information before and after the law, I am simply making mean differences between before and after the implementation of the law. I know this has infinite limitations, but we don't have more information.
The data has sampling weights.
To compare the mean knowledge between men and women, the model is:
Where the coefficient of the time variable (1 after the law and 0 before the law) captures the variation (test) for each sex separately, depending on the "if sex==1/2".
My question is that I would like to compare whether the variation in knowledge of men and women is statistically significant (ie, compare the coefficients of the time variable for both regressions). However, I have not been able to do it with this code, since the suest throws me an error due to the type of weights used.
Do any of you know how to do this?
I am currently using Stata 17.
Thanks in advance,
Isidora.
I'm trying to estimate the effects of a given program on the knowledge of a recently passed law.
Since I do not have a treatment and control group with information before and after the law, I am simply making mean differences between before and after the implementation of the law. I know this has infinite limitations, but we don't have more information.
The data has sampling weights.
To compare the mean knowledge between men and women, the model is:
Code:
reg knowledge time if sex==1 [pw=sampling_weight] // For men. reg knowledge time if sex==2 [pw=sampling_weight] // For women.
Where the coefficient of the time variable (1 after the law and 0 before the law) captures the variation (test) for each sex separately, depending on the "if sex==1/2".
My question is that I would like to compare whether the variation in knowledge of men and women is statistically significant (ie, compare the coefficients of the time variable for both regressions). However, I have not been able to do it with this code, since the suest throws me an error due to the type of weights used.
Code:
reg knowledge time if sex==1 [pw=sampling_weight] // For men.
est store regre_1
reg knowledge time if sex==2 [pw=sampling_weight] // For women.
est store regre_2
suest store regre_1 regre_2
Error: model regre_1 was estimated with pweights, you should re-estimate using iweights
lincom [regre_1]time - [regre_2]time
I am currently using Stata 17.
Thanks in advance,
Isidora.
Comment