# Re: st: Re: line patterns within Kaplan Maier

 From Michael McCulloch <[email protected]> To [email protected] Subject Re: st: Re: line patterns within Kaplan Maier Date Sun, 7 Oct 2007 08:24:19 -0700

Thank you Kit, for showing me the correct layering of parentheses on the plot#opts option.

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/
```
```*
*   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/
```