BookmarkSubscribeRSS Feed
pete6982
Calcite | Level 5

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,

2 REPLIES 2
art297
Opal | Level 21

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

Ksharp
Super User

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

........

proc printto;run;

can copy your output to another file.

Ksharp

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 1393 views
  • 3 likes
  • 3 in conversation