I am doing some survival analysis and want to store the p-values that get output to html to a data set so I can display the p-values and look relationships.
Here is an example of some code I've run:
proc lifetest data=data001_lifetest
outsurv=data001_outsurv
outtest=data001_outtest
plots=(s) notable;
time days*event(0);
strata study_group / test=logrank;
run;*0.70 seconds;
*p-value = 0.6355;
The outsurv and outtest data sets do not contain the p-values.
This html output is generated:
Test of Equality over Strata | |||
---|---|---|---|
Test | Chi-Square | DF | Pr > Chi-Square |
Log-Rank | 0.2247 | 1 | 0.6355 |
How do I scrape the 0.6355 into a table so I don't have to manually record them all (I have ~400 data sets now, thousands more planned)? Thanks,
Capture them with ODS. A nice article on the topic is: http://www.lexjansen.com/pharmasug/2010/ad/ad03.pdf
proc printto print='c:\output.txt';run;
........
proc printto;run;
can copy your output to another file.
Ksharp
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.