Hello everyone,

I would like to compute average marginal effects (AME) out of an interaction of GDP (p.c., logged, base 10) and regime‑type (dichotomous discrimination between autocracies and democracies): c.z_e_migdppcln##i.v2x_regime_01. The model likes like:

Code:
fracreg logit dvfrac_year c.z_v2x_civlib c.z_e_migdppcln##i.v2x_regime_01 i.regionMY
[fweight=cnt_total_year], vce(cluster country_id) allbaselevels
My research interest is to compare AME of explanatory variables while holding other covariates at their means (I am aware of the large CIs in the output). Which of the following syntax shall I use? Version A and B yield different results. Version B is sometimes described as “retrieving results for a subsample” using -over- option.

Code:
* Version A
margins i.v2x_regime_01, dydx(c.z_e_migdppcln) at((mean) z_v2x_civlib regionMY)
Array


Code:
*Version B
margins, dydx(c.z_e_migdppcln) over(i.v2x_regime_01) at((mean) z_v2x_civlib regionMY)
Array



Question 1) I am correct to say that version A computes AME using the whole span of GDP data irrespective of regime‑type? I am thinking about this issue since the max value of GDP is reached by a democracy and the min value by an autocracy in my sample.

Question 2) Shall I retrieve AME when respecting the min max values of autocracies and democracies as captured in version B? Or is version B an inappropriate syntax for an interaction?

I would appreciate your thoughts.

All the best,
Pavel