Hi all,
I am learning about graphing the marginal effects of a variable conditional on the values of a second variable. I see how to use the margins command and then graph those results with confidence intervals, which gives me a sense of whether the marginal effects of one variable in the interaction are significant over the value range of the other variable in the interaction. But, my conditioning variable has a range of 0 to 85, with a mean of less than 3. I would like to show a histogram of that distribution overlaid on top of the marginal effects graph. I see that in R, there is a package called "interplot" that makes it easy. Does anyone know how to do the same thing in Stata? I'm on version 15 if that matters.
Here is what I have been doing:
logit dependentvariable variableA variableB c.variableA#c.variableB covariateC covariate D, cluster(yadayada)
margins, dydx(variableA) at(variableB=(0(5)85)) vsquish
marginsplot, ylin(0)
Thanks so much for any tips.
Related Posts with Add histogram of values distribution when graphing conditional marginal effects?
Estimating Random Effects in Mixed-effect Logistic Regression ModelHello, I am facing a crucial problem during the estimation of a random effect in a mixed effect log…
Tabulating descriptive statistics by group and year Hi folks, give the data below, i would like to produce a similar table as shown in the image attach…
Student asking advice on how to learn mixed effects models and generalized estimating equations to account for 2 eyes in 1 patientGood day everyone, I'm a beginning ophthalmology researcher/student, and I wanted to reach out peop…
Running Difference in Difference with Fixed Effects, what assumptions to check next?I'm doing a DiD for a pension reform law that went into effect in 2016. I am using micro data from n…
Estimating Random Effects in Mixed-effect Logistic Regression ModelHello, I am facing a crucial problem during the estimation of a random effect in a mixed effect log…
Subscribe to:
Post Comments (Atom)
0 Response to Add histogram of values distribution when graphing conditional marginal effects?
Post a Comment