Hi Stata Users
It seems simple but I have a question on how to manually calculate the marginal effects at mean for logit model. So basically I need to manually replicate the results of the output I obtained when I used margins, dydx (*) atmeans (in other words, I need to replicate the red colored numbers using a manual method). I tried several things but couldn't replicate it. My continuous variables are gre and gpa and the categorical variable is rank. The dataset is attached
use binary
qui logit admit gre gpa i.rank
margins , dydx(*) atmeans
The output is given below
. qui logit admit gre gpa i.rank
. margins , dydx(*) atmeans
Conditional marginal effects Number of obs = 400
Model VCE : OIM
Expression : Pr(admit), predict()
dy/dx w.r.t. : gre gpa 2.rank 3.rank 4.rank
at : gre = 587.7 (mean)
gpa = 3.3899 (mean)
1.rank = .1525 (mean)
2.rank = .3775 (mean)
3.rank = .3025 (mean)
4.rank = .1675 (mean)
------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
gre | .0004743 .0002282 2.08 0.038 .0000271 .0009215
gpa | .1684057 .0691417 2.44 0.015 .0328904 .3039211
|
rank |
2 | -.164317 .0770559 -2.13 0.033 -.3153438 -.0132903
3 | -.2979896 .0761584 -3.91 0.000 -.4472572 -.1487219
4 | -.3319332 .0821748 -4.04 0.000 -.4929928 -.1708735
------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
Related Posts with Help with manually calculating marginal effects at mean for logit
Asdoc error in tabulation with Freq=1Hi all, I am having problems with asdoc when exist frequency=1, I know that its a naive question bu…
understanding a treatment effect with group fixed effectsI am trying to understand why the effect of a treatment variable in a regression changes when a) inc…
Error r(43) convergence not achieved. CFA, SEM, estat gofHi, I have a dataset with 12 ordinal variables of 4 categories. I use SEM command to perform CFA and…
An error "plugin not loaded or not available: use the adoonly option" accur after "ml maximize"I am trying to learn how to use mdraws by Cappellari and Jenkins.When replicating the example test_t…
Time-varying Covariate with Competing RisksHello, I have to study the relationship between a drug exposure and outcomes, adjusting for other c…
Subscribe to:
Post Comments (Atom)
0 Response to Help with manually calculating marginal effects at mean for logit
Post a Comment