Hi, I have a question about proc glmpower.
I just stared learning it for my power analysis. It's a repeated measure study with one main factor and 23 covariates. However, the REPEATED statement is not working here (it's in red color in SAS). Can anyone take a look at it and tell me why (code is below)? Actually the REPEATED statement didn't work in my SAS even when I copied code from other paper which I assume is correct. Is there any system option I need to invoke before I use this statement?
Thanks!!
proc glmpower data=final2;
class breast;
model physfun3 physfun4 = breast;
repeated time;
power
nfractional
stddev = 1
ncovariates = 23
corrxy = 0.5 0.5
0.6 0.6
0.02 0.02
0.2 0.2
-0.02 -0.03
0.1 0.1
-0.3 -0.3
-0.4 -0.4
-0.1 -0.1
-0.1 -0.1
-0.1 -0.1
-0.07 -0.08
-0.3 -0.3
-0.06 -0.08
-0.1 -0.1
-0.2 -0.2
-0.09 -0.1
-0.1 -0.1
0.06 0.07
0.1 0.1
0.3 0.3
-0.2 -0.1
-0.1 -0.2
alpha = 0.05
ntotal = .
power = 0.9;
plot x=power min=.5 max=.95;
run;
Which version of SAS are you using? Repeated may have been added to a later version if you are not running the latest.
It's 9.3. But proc glm with repeated statement works fine.
@Chengyiw wrote:
It's 9.3. But proc glm with repeated statement works fine.
But above you posted:
"However, the REPEATED statement is not working here "
So you may have to describe what you mean by "is not working here". Is there an error? Post the log with the code and the error message. No output generated? (check the log for warnings) Unexpected output? Show the output and describe how it varies from expected output;
@Chengyiw wrote:
8631 repeated time;
--------
180
NOTE: The previous statement has been deleted.
ERROR 180-322: Statement is not valid or it is used out of proper order.
This is the error message. SAS stopped processing. Nothing was generated.
Betting that in the log the dashes are under the word repeated and the post shifted them to the left it means that Repeated is not valid for your version. If you copied and example from an online source or documentation for version 9.4 that could very well be the problem. And the solution- 9.4.
And if it is the case, what are the other ways to do power analysis for repeated measures?
I believe the REPEATED statement was added in SAS/STAT 13.2 (Aug 2014), which shipped with SAS 9.4m2. SAS 9.3 was first shipped in 2011, and there have been six releases of SAS since then. You are missing a lot of cool features, including major enhancements to ODS graphics.
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!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.