Dear Statalisters,
I have a problem in computing the margins of a linear fixed effects regression that I have not managed to solve by looking at previous posts - I apologies in case I overlooked similar issues that had already been discussed.

I am running the following regression:
Code:
reghdfe DV cit_intern cit_hostcountry cit_hostcountry#ownethmig_max $CONTROLS , abs(i.patent i.cat_code) vce(cluster patent)
where:
DV is a binary variable;
ownethmig_max is collinear with patent fixed effects (and this is the reason why I did not use cit_hostcountry##ownethmig_max);
both cit_hostcountry and ownethmig_max are dychotomous variables.

I would like to compute average marginal effects of cit_hostcountry at different values of ownethmig_max in order to plot the results using marginsplot to better explain the results of the regressions.The following example is a simple one, but the final goal is to plot the marginal effects of a subsample analysis for four groups in the same graph.

In a previous similar model specification without patent fixed effects, I used:
Code:
margins, dydx(i.cit_hostcountry) over(ownethmig_max) post vsquish
marginsplot
This code gave me as result the following graph: Array


Once I introduce the patent fixed effects, the margins command gives me the following output:
Code:
Average marginal effects                          Number of obs   =     306546
Model VCE    : Robust

Expression   : Linear prediction, predict()
dy/dx w.r.t. : 1.cit_hostcountry
over         : ownethmig_max

------------------------------------------------------------------------------------
                   |            Delta-method
                   |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------------+----------------------------------------------------------------
1.cit_hostcountry  |
     ownethmig_max |
                0  |          .  (not estimable)
                1  |          .  (not estimable)
------------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
Is there any alternative approach to correctly compute average marginal effects and plot the results as in the previous model specification?

Any insights would be much appreciated.

Thank you,
Alba