[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Michael McCulloch <mm@pinestreetfoundation.org> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: sts test: displaying log-rank test of equality within a Kaplan Meier graph |

Date |
Thu, 11 Feb 2010 21:31:14 -0800 |

Thank you kindly Michael! On Feb 11, 2010, at 8:48 PM, Michael Norman Mitchell wrote:

Dear MichaelIf I understand your last message, you want to be able to changethe placement of the "log rank P= 3.67" text. If so, you can controlthat by the coordinates specified in the "text()" option. Forexample, if you do this...sysuse cancer.dta, clear stset studytime drop if drug==3 sts test drug local chi_res logrank P = `=round(r(chi2), .01)'sts graph, by(drug) risktable text(.95 28 "`chi_res'", size(small)col(red))The text will be displayed in the upper right corner, because thecoordinates are y=.95 x=28. You can fiddle with those (Y,X) valuesto place the text whereever yo like. I hope that helps,Michael N. Mitchell See the Stata tidbit of the week at... http://www.MichaelNormanMitchell.com Visit me on Facebook at... http://www.facebook.com/MichaelNormanMitchell On 2010-02-11 8.28 PM, Michael McCulloch wrote:Thanks Phillip! This gives me the idea. May I ask:* regardless of what place option I use: ne, se, nw, sw, etc.,they all put the text box in the lower left corner. I've read -helpcompassdirstyle- and* bexpand also doesn't expand the size of the box. Michael On Feb 11, 2010, at 8:05 PM, Philip Ryan wrote:MichaelI note you wanted a "window". Here is a box instead. I alsocorrect mymisuse of the return scalars :-( sysuse cancer.dta, clear stset studytime drop if drug==3 sts test drug local chi_P logrank P = `=round(chi2tail(r(df),r(chi2)), .01)' sts graph, by(drug) risktable text(.05 5 "`chi_P'", place(ne) box size(small) col(red)) Philip Ryan University of Adelaide -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of MichaelMcCullochSent: Friday, 12 February 2010 1:23 PM To: Statalist StatalistSubject: sts test: displaying log-rank test of equality within aKaplanMeier graph Dear Statalist members, I'm creating a Kaplan-Meier graph, and also performing the log-rank test of equality, for example: sysuse cancer.dta, clear stset studytime drop if drug==3 sts graph, by(drug) risktable sts test drug My question: is it possible to display the results of the log-rank test in a small window within the area of the Kaplan-Meier survival curve? Best wishes, Michael McCulloch Pine Street Foundation 124 Pine Street San Anselmo, CA 94960-2674 tel: 415-407-1357 fax: 206-338-2391 * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/Best wishes, Michael McCulloch Pine Street Foundation 124 Pine Street San Anselmo, CA 94960-2674 tel: 415-407-1357 fax: 206-338-2391 * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

Best wishes, Michael McCulloch Pine Street Foundation 124 Pine Street San Anselmo, CA 94960-2674 tel: 415-407-1357 fax: 206-338-2391 * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**sts test: displaying log-rank test of equality within a Kaplan Meier graph***From:*Michael McCulloch <mm@pinestreetfoundation.org>

**RE: sts test: displaying log-rank test of equality within a Kaplan Meier graph***From:*"Philip Ryan" <philip.ryan@adelaide.edu.au>

**Re: sts test: displaying log-rank test of equality within a Kaplan Meier graph***From:*Michael McCulloch <mm@pinestreetfoundation.org>

**Re: sts test: displaying log-rank test of equality within a Kaplan Meier graph***From:*Michael Norman Mitchell <Michael.Norman.Mitchell@gmail.com>

- Prev by Date:
**Re: sts test: displaying log-rank test of equality within a Kaplan Meier graph** - Next by Date:
**st: -outreg2- for nonlinear regressions?** - Previous by thread:
**Re: sts test: displaying log-rank test of equality within a Kaplan Meier graph** - Next by thread:
**st: -outreg2- for nonlinear regressions?** - Index(es):

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