Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: how to get a two-line-graph for predicted probabilites in logistic regression model with a metric controll variable (SE10)
From
"Prof. Dr. Claudia Schuchart" <[email protected]>
To
[email protected]
Subject
Re: st: how to get a two-line-graph for predicted probabilites in logistic regression model with a metric controll variable (SE10)
Date
Mon, 03 Jun 2013 11:24:01 +0200
Hi Maarten,
sorry for sending to you a private email - I just have read pt6 of
Statalist FAQ.
My problem is, that the twoway-command does not work and I could not
find out a solution:
. twoway rarea lb ub south if union == 0, astyle(ci) || ///
(...)
/ / / is not a twoway plot type
r(198);
. rarea lb ub south if union == 1, astyle(ci2) || ///
unrecognized command: rarea
r(199);
. line pr south if union == 0 || ///
/ / / is not a twoway plot type
r(198);
. line pr south if union == 1, ///
option / not allowed
r(198);
. legend(order(1 "95% CI" 3 "union" 4 "non-union")) ///
unrecognized command: legend
(...)
Thank you,
Claudia
Am 5/29/2013 10:23 AM, schrieb Maarten Buis:
For older versions of Stata you can use the -adjust- command for that like so:
*------------------ begin example ------------------
sysuse nlsw88, clear
xi: logit married age i.south*i.union
preserve
adjust age, by(south union) ci replace pr
twoway rarea lb ub south if union == 0, astyle(ci) || ///
rarea lb ub south if union == 1, astyle(ci2) || ///
line pr south if union == 0 || ///
line pr south if union == 1, ///
legend(order(1 "95% CI" 3 "union" 4 "non-union")) ///
scheme(s2color) ylab(,angle(horizontal)) ///
xlab(0 "North" 1 "South") ///
xtitle(area of residence) ///
ytitle(predicted probability of being married)
restore
*------------------- end example -------------------
(For more on examples I sent to the Statalist see:
http://www.maartenbuis.nl/example_faq )
Hope this helps,
Maarten
On Tue, May 28, 2013 at 3:53 PM, Prof. Dr. Claudia Schuchart wrote:
I did a graph with SE10 for predicted probabilites in a logistic regression
model. I controlled for intelligence (metric), and considered two indendent
binary vaiables as well as the interaction between them (N=187). I want to
have a two-line-graph (holding intelligence constant), instead I got
multiple graphs for any intelligence value:
xi: logit y i.a*i.b IQ
predict y, pr
separate y, by(b)
graph twoway line y0 y1 a , xlabel(1 2)
How can I get a two line graph only?
---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany
http://www.maartenbuis.nl
---------------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
--
*****************************************************
Prof. Dr. Claudia Schuchart
Lehrstuhl für Empirische Bildungsforschung
Leiterin Forschungsgruppe Schule und Bildung
Bergische Universität Wuppertal
School of Education
Institut für Bildungsforschung
Gaußstr. 20
D-42119 Wuppertal
Fon (Sekretariat): 0049/ 202 439 2325
Fon (direkt): 0049/ 202 439 3329
Fax: 0049/ 202 439 3681
Raum S. 15.28
*****************************************************
begin:vcard
fn:Prof. Dr. Claudia Schuchart
n:Claudia Schuchart;Prof. Dr.
email;internet:[email protected]
version:2.1
end:vcard