[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Kit Baum <baum@bc.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: Re: line patterns within Kaplan Maier |

Date |
Sun, 7 Oct 2007 07:50:21 -0400 |

Michael said

Thank you Kit for pointing out that help text. What I'm looking for,

so far unsuccessfully, is guidelines on how to specify specific

formulas for cline_options for specific values of A and B.

The cline_options formulas I specified below were successful for only

the plot lines in which A==1 and B==1, or

A==0 & B==0.

However, but the other plot lines where

A==0 & B==1, or

A==1 & B==0.

remained a solid line in spite of my specification:

sts graph if stage==5, by(A B) lpattern(-) xtitle("Survival time in ///

months") l2title("Percent surviving") xmtick(0(10)150) ///

lpattern("l" if A==1 & B==1) ///

lpattern("--" if A==1 & B==0) ///

lpattern("--" if A==0 & B==1) ///

lpattern("--.#" if A==0 & B==0) ///

You need to think graphically, not logically in terms of what you're graphing. Your graph has four lines, and there are a number of graphics options that refer to the line number, not where that line came from. This notion is common to many aspects of Stata graphics.

. webuse drug2

(Patient Survival in Drug Trial)

. sts graph, cumhaz by(drug)

failure _d: died

analysis time _t: studytime

. sts graph, cumhaz by(drug) plot1opts(lpattern(shortdash_dot) color (cranberry))

> plot2opts(lpattern(dash) color(purple))

works for me.

Kit Baum, Boston College Economics and DIW Berlin

http://ideas.repec.org/e/pba1.html

An Introduction to Modern Econometrics Using Stata:

http://www.stata-press.com/books/imeus.html

On Oct 7, 2007, at 2:33 AM, statalist-digest wrote:

Thank you Kit for pointing out that help text. What I'm looking for,

so far unsuccessfully, is guidelines on how to specify specific

formulas for cline_options for specific values of A and B.

The cline_options formulas I specified below were successful for only

the plot lines in which A==1 and B==1, or

A==0 & B==0.

However, but the other plot lines where

A==0 & B==1, or

A==1 & B==0.

remained a solid line in spite of my specification:

sts graph if stage==5, by(A B) lpattern(-) xtitle("Survival time in ///

months") l2title("Percent surviving") xmtick(0(10)150) ///

lpattern("l" if A==1 & B==1) ///

lpattern("--" if A==1 & B==0) ///

lpattern("--" if A==0 & B==1) ///

lpattern("--.#" if A==0 & B==0) ///

* * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: Re: line patterns within Kaplan Maier***From:*Michael McCulloch <mm@pinest.org>

- Prev by Date:
**Re: st: line patterns within Kaplan Meier** - Next by Date:
**Re: st: dropped observations in bootstrap** - Previous by thread:
**Re: st: re: line patterns within Kaplan Maier** - Next by thread:
**Re: st: Re: line patterns within Kaplan Maier** - Index(es):

© Copyright 1996–2017 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |