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 |
Nick Cox <[email protected]> |

To |
"[email protected]" <[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, 3 Jun 2013 10:52:11 +0100 |

You are probably trying to type multiline commands including /// one by one in the Command window. That won't work. Use a do-file or the do-file editor. Nick [email protected] On 3 June 2013 10:24, Prof. Dr. Claudia Schuchart <[email protected]> wrote: > 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? * * 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**:**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]>

- Prev by Date:
**Re: st: Request regarding conversion of Stata code** - Next by Date:
**Re: st: how to get a two-line-graph for predicted probabilites in logistic regression model with a metric controll variable (SE10)** - Previous by thread:
- Next by thread:
- Index(es):