BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
UcheOkoro
Lapis Lazuli | Level 10

Hello,

 

Please, I need help plotting this survival sample size calculation. The problem is with the plot x=effect. Please, what is the right thing?

Below is my code.

Thank you

 

ods listing style=htmlbluecml;
ods graphics on;
   proc power;
   twosamplesurvival test=logrank
      curve("Standard") = 90 : 0.7
      curve("Proposed") = (10 to 90 by 10):(0.95 0.9 0.85 0.8 0.75 0.7 0.65 0.60 0.55)
      groupsurvival = "Standard" | "Proposed"
      accrualtime = 0
      followuptime = 90
       power = 0.8
      npergroup = .;
   plot x=effect min=0 max=90;run;
1 ACCEPTED SOLUTION

Accepted Solutions
UcheOkoro
Lapis Lazuli | Level 10

ods listing style=htmlbluecml;
ods graphics on;
proc power;
twosamplesurvival test=logrank
curve("Standard") = 90 : 0.7
curve("Proposed") = (10 to 90 by 10):(0.95 0.9 0.85 0.8 0.75 0.7 0.65 0.60 0.55)
groupsurvival = "Standard" | "Proposed"
accrualtime = 0
followuptime = 90
power = 0.8
npergroup = .;
plot x=power min=0 max=1;run;

View solution in original post

2 REPLIES 2
ballardw
Super User

That is not a "problem". That is an ERROR.

Running your code:

115     proc power;
116     twosamplesurvival test=logrank
117        curve("Standard") = 90 : 0.7
118        curve("Proposed") = (10 to 90 by 10):(0.95 0.9 0.85 0.8 0.75 0.7 0.65 0.60 0.55)
119        groupsurvival = "Standard" | "Proposed"
120        accrualtime = 0
121        followuptime = 90
122         power = 0.8
123        npergroup = .;
124     plot x=effect min=0 max=90;
125  run;

ERROR: X=EFFECT is invalid for this analysis.

With Twosamplesurvival the effect supported is Hazard ratio if used. Which means a Hazardratio paremeter or list is required. The Hazardratio is incompatible with Groupsurvival. So to get plots you need to rephrase your approach. I don't know enough about the survival stuff to make a viable suggestion.

UcheOkoro
Lapis Lazuli | Level 10

ods listing style=htmlbluecml;
ods graphics on;
proc power;
twosamplesurvival test=logrank
curve("Standard") = 90 : 0.7
curve("Proposed") = (10 to 90 by 10):(0.95 0.9 0.85 0.8 0.75 0.7 0.65 0.60 0.55)
groupsurvival = "Standard" | "Proposed"
accrualtime = 0
followuptime = 90
power = 0.8
npergroup = .;
plot x=power min=0 max=1;run;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 361 views
  • 0 likes
  • 2 in conversation