Help using Base SAS procedures

Proc glmpower

Reply
Occasional Contributor
Posts: 8

Proc glmpower

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;

Super User
Posts: 10,543

Re: Proc glmpower

Which version of SAS are you using? Repeated may have been added to a later version if you are not running the latest.

Occasional Contributor
Posts: 8

Re: Proc glmpower

It's 9.3. But proc glm with repeated statement works fine.

Super User
Posts: 10,543

Re: Proc glmpower


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;

Occasional Contributor
Posts: 8

Re: Proc glmpower

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.
Super User
Posts: 10,543

Re: Proc glmpower


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.

Occasional Contributor
Posts: 8

Re: Proc glmpower

Thanks!
Occasional Contributor
Posts: 8

Re: Proc glmpower

Without the repeated statement, I got output of a graph with two lines showing the relationships of power and sample size for each dependent variable. But I need a multivariate result. So I am thinking to use repeated and manova statements. Both caused error.
Occasional Contributor
Posts: 8

Re: Proc glmpower

And if it is the case, what are the other ways to do power analysis for repeated measures?

SAS Super FREQ
Posts: 3,488

Re: Proc glmpower

[ Edited ]

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.

Ask a Question
Discussion stats
  • 9 replies
  • 308 views
  • 2 likes
  • 3 in conversation