Programming the statistical procedures from SAS

store p-values in a data set

Reply
N/A
Posts: 1

store p-values in a data set

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
TestChi-SquareDFPr >
Chi-Square
Log-Rank0.224710.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,

Esteemed Advisor
Posts: 7,053

store p-values in a data set

Capture them with ODS.  A nice article on the topic is: http://www.lexjansen.com/pharmasug/2010/ad/ad03.pdf

Grand Advisor
Posts: 9,447

store p-values in a data set

proc printto print='c:\output.txt';run;

........

proc printto;run;

can copy your output to another file.

Ksharp

Ask a Question
Discussion stats
  • 2 replies
  • 132 views
  • 3 likes
  • 3 in conversation