I am trying to run a power analysis with the following specifications to get the required sample size:
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?
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.
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.
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!
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.