Bookmark and Share

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]

st: stored p-value of sts test


From   Steve Nakoneshny <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: stored p-value of sts test
Date   Fri, 20 Jan 2012 11:08:12 -0700

Dear Statalisters,

I am performing some exploratory analyses in an stsetted dataset using Stata 11.2 for Mac.

As part of a loop, I coded the following:

-- start code --

sts test `x', logrank
sts graph, by(`x') tmax(60)
graph save `x', replace

-- end code --

My local `x' comprises 18 variables, so the loop generates more graphs than I actually want to save. Looking at the help, I see that -sts graph- accepts -if- statements. What I would like to do is only graph (and save) where -sts test- is statistically significant (p<0.05). According to -help-, -sts test- doesn't save the p-value in r().

What I would like to know is whether or not the p-value is stored somewhere else (if at all) or if there is an alternate workaround I can implement.


Thanks,
Steve
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index