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!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 783 views
  • 4 likes
  • 2 in conversation