Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Alexander M. Jais" <jais@win.rwth-aachen.de> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: SIMULATION TO INTERPRET AND PRESENT LOGIT RESULTS |
Date | Thu, 01 Mar 2012 10:04:18 +0100 |
Dear Statalisters, For some reason I’ve a
really hard time to figure out how I can graph my logistic
regression model in Stata. I am aware of the explanation of
Zellner (2009; Strategic Management Journal) and Tomz et al
(2001; Harvard University: Cambridge). I ve the following issue: · My logistic regression has
the following _expression_ simplified: logit EquityMode Psychic
Distance Means-Driven PsychDxMeansD o Dependent Variable_Equity
Mode: Code 0 = for Non-Equity and Code 1 = Equity o Interaction Variable_Psychic
Distance: Construct based on 6 items with 7 point likert scale o Independent
Variable_Means-Driven: : Construct based on 6 items with 7 point
likert scale o Moderation_ PsychDxMeansD:
Psychic Distance times Means-Driven ·
My current Do-Files looks
like this: 1. set seed 9999 2. noisily estsimp logit
EquityMode PsychicDistance Means-Driven PsychDxMeansD, nolog 3.
foreach var in X Y0 Y1 Y0lb Y1lb Y0ub Y1ub dY dYlb dYub { 4. gen `var' = . 5.
} 6.
forvalues obs = 1(1)18 { 7.
replace X =
.01*(`obs'+1) in `obs' 8.
setx 0 9.
setx Means-Driven .01*(`obs'+1) 10.
foreach as_lev in
0 1 { 11. setx
PsychicDistance `as_lev' PsychDxMeansD `as_lev'*.01*(`obs'+1) 12. simqi,
genpr(Y`as_lev'_tmp)
prval(1) 13. sum
Y`as_lev'_tmp, meanonly 14. replace
Y`as_lev'
= r(mean) in `obs' 15. _pctile
Y`as_lev'_tmp,
p(2.5, 97.5) 16. replace
Y`as_lev'lb
= r(r1) in `obs' 17. replace
Y`as_lev'ub
= r(r2) in `obs' 18. } 19. gen dY_tmp = Y1_tmp
- Y0_tmp 20. sum dY_tmp, meanonly 21. replace dY = r(mean)
in `obs' 22. _pctile dY_tmp,
p(2.5,97.5) 23. replace dYlb = r(r1)
in `obs' 24. replace dYub = r(r2)
in `obs' 25. drop *_tmp 26. } 27. twoway rbar Y0ub Y1lb X,
mw msize(1) lcolor(gs0) fcolor(gs16)|| line Y0 X, color(gs0) ||
rspike Y1ub Y1lb X, color(gs0) lp(dot) || line Y1 X, color(gs0)
|| , yscale (r(0 1)) ylabel(0(.2)1) legend(off) xtitle("Means
Driven") ytitle("Equity Mode") graphregion(fcolor(gs16)) MANY THANKS for advice
highly appreciated! All the best, Alex --
Alexander M. Jais Ph.D. Candidate Institute for Engineers & Natural Scientists RWTH Aachen University Germany phone: +49 170 89 33 22 1 mailto: jais@win.rwth-aachen.de web: www.win.rwth-aachen.de |