BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Susana0000
Fluorite | Level 6

Hello

 

I am a new SAS user and have come across proc mixed.

I was wondering why sometimes no variable is specified in the repeated statement and other times it is.

When no variable is specified, what does SAS assume? 

1 ACCEPTED SOLUTION

Accepted Solutions
gcjfernandez
SAS Employee

 Proc Mixed Repeated statement documentation: https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_mixed_syntax14.htm

differentiates the following:

 

For many repeated measures models, no repeated effect is required in the REPEATED statement. Simply use the SUBJECT= option to define the blocks of R and the TYPE= option to define their covariance structure.

 

In this case, the repeated measures data must be similarly ordered for each subject, and you must indicate all missing response variables with periods in the input data set unless they all fall at the end of a subject’s repeated response profile.

 

These requirements are necessary in order to inform PROC MIXED of the proper location of the observed repeated responses.

 

Specifying a repeated effect is useful when you do not want to indicate missing values with periods in the input data set.

 

The repeated effect must contain only classification variables.

 

Make sure that the levels of the repeated effect are different for each observation within a subject; otherwise, PROC MIXED constructs identical rows in  corresponding to the observations with the same level.

 

This results in a singular R  and an infinite likelihood.

 

Whether you specify a REPEATED effect or not, the rows of  for each subject are constructed in the order in which they appear in the input data set.

 

View solution in original post

2 REPLIES 2
gcjfernandez
SAS Employee

 Proc Mixed Repeated statement documentation: https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_mixed_syntax14.htm

differentiates the following:

 

For many repeated measures models, no repeated effect is required in the REPEATED statement. Simply use the SUBJECT= option to define the blocks of R and the TYPE= option to define their covariance structure.

 

In this case, the repeated measures data must be similarly ordered for each subject, and you must indicate all missing response variables with periods in the input data set unless they all fall at the end of a subject’s repeated response profile.

 

These requirements are necessary in order to inform PROC MIXED of the proper location of the observed repeated responses.

 

Specifying a repeated effect is useful when you do not want to indicate missing values with periods in the input data set.

 

The repeated effect must contain only classification variables.

 

Make sure that the levels of the repeated effect are different for each observation within a subject; otherwise, PROC MIXED constructs identical rows in  corresponding to the observations with the same level.

 

This results in a singular R  and an infinite likelihood.

 

Whether you specify a REPEATED effect or not, the rows of  for each subject are constructed in the order in which they appear in the input data set.

 

jiltao
SAS Super FREQ

@gcjfernandez answered your question very well. Thanks!

I just want to point out that although it is not necessary to specify the repeated effect in the REPEATED statement in PROC MIXED, it is highly recommended to include the repeated effect. In the case of unbalanced repeated measures data / missing repeated time points, omitting the repeated effect might result in calculations not what you intended for certain models. 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 560 views
  • 5 likes
  • 3 in conversation