Hello!
I would like to ask about the stata command for comparing the difference in coefficients of the same variables in different regression models.
What I want to do is different from the grouping test performed for categorical variables. Here is the example :
Regression 1: reghdfe y x controls if M==1 ,absorb(id year) vce(cluster id)
Regression 2: reghdfe y x controls if N==1 ,absorb(id year) vce(cluster id)
It should be noted that some of the observations are in both M and N sample; id is the firm fixed effect
The question is: now I need to compare whether the coefficient of X in regression 1 is significantly larger than the coefficient of X in regression 2 (need to find out the two-tailed p-value), how do I write the code in Stata?
Looking forward to your reply, many thanks!
I would like to ask about the stata command for comparing the difference in coefficients of the same variables in different regression models.
What I want to do is different from the grouping test performed for categorical variables. Here is the example :
Regression 1: reghdfe y x controls if M==1 ,absorb(id year) vce(cluster id)
Regression 2: reghdfe y x controls if N==1 ,absorb(id year) vce(cluster id)
It should be noted that some of the observations are in both M and N sample; id is the firm fixed effect
The question is: now I need to compare whether the coefficient of X in regression 1 is significantly larger than the coefficient of X in regression 2 (need to find out the two-tailed p-value), how do I write the code in Stata?
Looking forward to your reply, many thanks!
Comment