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]

From |
Maarten Buis <maartenlbuis@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: how to get a two-line-graph for predicted probabilites in logistic regression model with a metric controll variable (SE10) |

Date |
Wed, 29 May 2013 10:23:20 +0200 |

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/

**References**:**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" <schuchart@uni-wuppertal.de>

- Prev by Date:
**Re: st: how to get a two-line-graph for predicted probabilites in logistic regression model with a metric controll variable (SE10)** - Next by Date:
**Re: st: Transferring between Mac And Windows versions** - Previous by thread:
**Re: st: how to get a two-line-graph for predicted probabilites in logistic regression model with a metric controll variable (SE10)** - Next by thread:
**st: lowest value in a series of variables in wide data** - Index(es):