BookmarkSubscribeRSS Feed
Chengyiw
Fluorite | Level 6

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;

9 REPLIES 9
ballardw
Super User

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

Chengyiw
Fluorite | Level 6

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

ballardw
Super User

@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
Fluorite | Level 6
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.
ballardw
Super User

@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.

Chengyiw
Fluorite | Level 6
Thanks!
Chengyiw
Fluorite | Level 6
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.
Chengyiw
Fluorite | Level 6

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

Rick_SAS
SAS Super FREQ

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 1340 views
  • 2 likes
  • 3 in conversation