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

I am trying to run a power analysis with the following specifications to get the required sample size:

 

  1. Model is logistic regression with binary outcome
  2. Two separate treatments, and a control, with the following probabilities:
    1. Control: 0.30
    2. Treatment 1: 0.27
    3. Treatment 2: 0.14
  3. 80% power, and 0.05 alpha

I’m not sure how to use proc power with three study arms. I could not figure out how to specify a non-ordinal, categorical variable in the vardist statement. I input each treatment effect as an ordinal dummy variable to compare to the control group. However, because proc power doesn’t allow for multiple odds ratios in the testoddsratio statement, I put the odds ratio for treatment two as a covariate effect. Here is my code:

 

proc power;
logistic
vardist("x1") = ordinal((0, 1) : (0.5, 0.5))
vardist("x2") = ordinal((0, 1) : (0.5, 0.5))
testpredictor = "x1"
covariates = "x2"
responseprob = 0.30
testoddsratio = 0.863
covoddsratios = 0.38
ntotal = .
power = 0.80;
run;

 

It gives me an N of 7,107; 2,369 for each group. Is there a way to specify a non-ordinal, categorical testpredictor in the vardist statement, and if so, how do I put two odds ratios in the testoddsratio statement?

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

If you just need the sample size for testing for any difference among the three treatment levels, as can be performed by a Pearson or likelihood ratio chi-square test, then this is easily done as discussed and illustrated in Example 3 in the Results tab of the PowerRxC macro, which shows how to do it with that macro or with the CUSTOM statement in PROC POWER.

View solution in original post

1 REPLY 1
StatDave
SAS Super FREQ

If you just need the sample size for testing for any difference among the three treatment levels, as can be performed by a Pearson or likelihood ratio chi-square test, then this is easily done as discussed and illustrated in Example 3 in the Results tab of the PowerRxC macro, which shows how to do it with that macro or with the CUSTOM statement in PROC POWER.

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 25. 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
  • 1 reply
  • 784 views
  • 2 likes
  • 2 in conversation