GLM Syntax - Example 9: Multivariate Repeated Measures
This example illustrates the specification for a one-way between-group and one-way multivariate (3 dependent measures) within subject (repeated measures) design. You can run this example with the example data file Dials.sta. Note that brief descriptive comments are enclosed in curly brackets.
To specify a multivariate repeated measures design, specify the repeated measures design so that the number of dependent variables is divisible by the product of the levels of the repeated measures factors (i.e., so that the ratio of the number of variables to the product of the levels of the repeated measures factors is an integer equal or greater than 1); the result of that division is the number of (multivariate) dependent measures. For example, if there are 12 dependent variables, and the repeated measures design is a 2 x 3 (=6), then the design will have 12/6=2 dependent measures. When the program assigns the variables in the dependent variable list to the successive levels of the within (repeated measures) factor and dependent measures, the fastest moving index is that for the dependent measures, the next fastest moving index is that of the repeated measures factor that was specified last, the next fastest moving index is that of the repeated measures factor that was specified next to last, and so on. See also Specifying more than one repeated measures factor, or Multivariate repeated measures designs for a detailed description of how to specify repeated measures factors.
GLM;
{ Dependent variable list: }
DEPENDENT = TIM1_DL1 TIM1_DL2 TIM1_DL3
TIM2_DL1 TIM2_DL2 TIM2_DL3
TIM3_DL1 TIM3_DL2 TIM3_DL3;
{ Specification of grouping variable; note that
the text values (codes) are specified inside single quotation
marks; you can also specify numbers (e.g., 1 2), or not
specify any values, to use all that are found in variable NOISE
in the data file }
GROUPS = NOISE('MEANGFLL' 'WHITE');
{ There is only one between-group factor in the design, so only
the main effect will be specified for the between group design }
DESIGN = NOISE;
{ One within-subject (repeated) measures factor is specified, with
three levels. As the program assigns dependent variables to the
levels for the repeated measures factor and the (multivariate)
dependent measures, the fastest moving index is that of the multiple
dependent measures; thus, Tim1_Dl1, Tim1_Dl2, and Tim1_Dl3, are
the 3 dependent measures for the first level of the repeated measures
factor Time. }
REPEATED = TIME 3;
{ The within-subject repeated measures design consists of the
Time main effect only. }
WDESIGN = TIME;
For more examples, see GLM Syntax Examples.