I want to compare weather the effect of x to y are different in male group and female group. So i hvae run the regress like this.
library(arrow)
library(fixest)
df <- arrow::read_feather('test.feather')
res <- feols(y~x | id +year , data = df, split=~gender)
etable(res, ……)
the coef of x may shows like this:x 0.251***(gender=0) 0.269***(gender=1).
my questions is : how the check the two coefficents are significant different or not?
Thank you!
- run the regression like this: feols(y~x*gender | id + year )
- maybe using the function linearHypothesis from
car
package to test the diffience? but i don't know how. - run suest may handle my work.