Dear statalist,
I'm trying to generate predicted marginal effects of a treatment variable (treat) after estimating a random effect model with random coefficients for the treatment. The treatment variable is nested within countries, so the models include random intercepts for that. I interact the treatment with a covariate for countries (gdp). So, the model has the following equation:
mixed outcome treat##gdp || country:gdp
My question is how to plot the treatment effect at various levels of gdp, but with excluding the random effect. I want to plot only the fixed effect part of the treatment effect, which would reflect the coefficient on the interaction obtained from a regression table. I used the margins command, but it doesn't seem to be doing that. I also tried to add the option: predict(mu fixedonly), but it didn't work.
I would appreciate your suggestions.
I'm trying to generate predicted marginal effects of a treatment variable (treat) after estimating a random effect model with random coefficients for the treatment. The treatment variable is nested within countries, so the models include random intercepts for that. I interact the treatment with a covariate for countries (gdp). So, the model has the following equation:
mixed outcome treat##gdp || country:gdp
My question is how to plot the treatment effect at various levels of gdp, but with excluding the random effect. I want to plot only the fixed effect part of the treatment effect, which would reflect the coefficient on the interaction obtained from a regression table. I used the margins command, but it doesn't seem to be doing that. I also tried to add the option: predict(mu fixedonly), but it didn't work.
I would appreciate your suggestions.
Comment