BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
CHELS
Obsidian | Level 7

I have simulated 10,000 data set and wants to use them to perform 10,000 proc phreg.  I would then have 10,000 Hazard Ratios and I want to compute their mean. The only way I  know how is to ods output the 10,000 Hazard Ratio, combine them together then calculate the mean. I am wondering if there is any better ways of doing without outputting every single one of them?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Yes. Instead of 10,000 data sets, use one data set with 10,000 values of an ID variable. Use BY group analysis in PROC PHREG and a single ODS OUTPUT statement. Details in the article

Simulation in SAS: The slow way or the BY way

When you so this, be sure to suppress the output tables to the screen. Just save the ones you need to a data set.

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ

Yes. Instead of 10,000 data sets, use one data set with 10,000 values of an ID variable. Use BY group analysis in PROC PHREG and a single ODS OUTPUT statement. Details in the article

Simulation in SAS: The slow way or the BY way

When you so this, be sure to suppress the output tables to the screen. Just save the ones you need to a data set.

CHELS
Obsidian | Level 7
Thank you! You are the hero!