Dear All
I am trying to estimate the following equations and test whether the coefficients varies across the three models
use data.dta
use data.dta
keep if organic=1
use data.dta
keep if organic=0
I want to test whether the coefficients of EU and Contig differ across the three models. The models 2) and 3) are estimated using subdata of the 1).
I have read this thread, which is very helpful. My understanding is that it is better I estimate one model with interactions and the coefficient of the interaction term becomes the differences, like
suest Value2 Value3
test [Value2_mean]EU_Member=[Value3_mean]EU_Member
But it didn’t work. I got the error message
". . suest Value2 Value3
estimation sample of the model saved under Value2 could not be restored
r(198);
end of do-file
r(198);"
I also used reg instead of reghdfe, and stated the FE as i.year i.product instead of absorb(.)
use data.dta
use data.dta
keep if organic=0
use data.dta
keep if organic=1
suest Value2 Value3, vce(robust)
test [Value2_mean]EU_Member=[Value3_mean]EU_Member
This too did not work, I got the error message “product: factor variable base category conflict r(198)”. But when I dropped the product FE (i.product), everything worked as expected. I need to include the product FE. Any guidance? Thank you in advance for the support.
I am trying to estimate the following equations and test whether the coefficients varies across the three models
use data.dta
- reghdfe ln_Import i.EU i.Contig controls, absorb( year product) vce(robust)
use data.dta
keep if organic=1
- reghdfe ln_Import i.EU i.Contig controls, absorb( year product) vce(robust)
use data.dta
keep if organic=0
- reghdfe ln_Import i.EU i.Contig controls, absorb( year product) vce(robust)
I want to test whether the coefficients of EU and Contig differ across the three models. The models 2) and 3) are estimated using subdata of the 1).
I have read this thread, which is very helpful. My understanding is that it is better I estimate one model with interactions and the coefficient of the interaction term becomes the differences, like
- reghdfe ln_Import i.EU i.Contig i.EU##organic i.Contig##organic controls, absorb( year product) vce(robust)
suest Value2 Value3
test [Value2_mean]EU_Member=[Value3_mean]EU_Member
But it didn’t work. I got the error message
". . suest Value2 Value3
estimation sample of the model saved under Value2 could not be restored
r(198);
end of do-file
r(198);"
I also used reg instead of reghdfe, and stated the FE as i.year i.product instead of absorb(.)
use data.dta
- reg ln_Import i.EU i.Contig controls, i.year i.product
use data.dta
keep if organic=0
- reg ln_Import i.EU i.Contig controls, i.year i.product
use data.dta
keep if organic=1
- reg ln_Import i.EU i.Contig controls, i.year i.product
suest Value2 Value3, vce(robust)
test [Value2_mean]EU_Member=[Value3_mean]EU_Member
This too did not work, I got the error message “product: factor variable base category conflict r(198)”. But when I dropped the product FE (i.product), everything worked as expected. I need to include the product FE. Any guidance? Thank you in advance for the support.

Comment