Unstructured multivariate approach (UMA)
The UMA handles the measurements in the subject as a vector of multivariate responses and treats time points as levels of a qualitative factor with no order. This approach is restricted in equally spaced time points, balanced data with complete measurements and also assumes the homogeneity of covariance matrices in all the k groups.
Let
denote the vector of
m responses from the
ith subject in group
h for
i = 1,...,
n
_{
h
}
, h = 1,...,
k. It is assumed that the response vectors,
Y
_{
ih
}, are independent and have multivariate normal distribution with mean
and common covariance matrix
Σ. The total mean vector is also defined as
. If there is no additional covariate, one can use a profile model as
where the vector
is the vector of error for the ith subject in group h.
The primary hypothesis interest in a profile analysis is the parallelism of the k groups' profiles or no group × time interaction effect. The hypothesis can be constructed as H
_{
0
}: C μ
_{
1
} = ... = C μ
_{
k
} for an appropriate transformation matrix C with rank m1. If the test of interaction is not significant, the tests of the main effects are not confounded. In order to compute any MANOVAtype test statistics such as Wilk's lambda (Λ), the condition Nk >m1 is necessary, where N is the total number of subjects. Otherwise, the estimated covariance matrix of the transformed responses would not be nonsingular and positivedefinite. To test time effect, one can investigate the equality of the m elements of the total mean vector (
) using onesample Hotelling's T
^{
2
} test on the m1 differences between adjacent measurements from each subject. Here, the same strategy as the SMA is utilized to test group effect, as it is often more efficient than MANOVAtype tests to compare the groups' mean vectors.
Linear mixed model (LMM)
Let
denote the
m
_{
i
} × 1 vector of responses from the
ith subject for
i = 1,...,
N, where
N is the total number of subjects. In contrast to the UMA, the subjects may have different measuring time points and be unbalanced in terms of the number of measurements. The general form of the LMM is
where
is an m
_{
i
} × p fixedeffects design matrix for the ith subject, β is a p × 1 vector of fixedeffects parameters for the population, b
_{
i
} is a q × 1 vector of random effects for the ith subject,
is an m
_{
i
} × q randomeffects design matrix for the ith subject with q ≤ p, and ε
_{
i
} is an m
_{
i
} × 1 vector of withinsubject errors. The randomeffects vectors, b
_{
i
}, are assumed to be independent and to have a multivariate normal distribution with mean zero and covariance matrix G
_{
i
}, and the error vectors, ε
_{
i
}, are assumed to be independent and to have a multivariate normal distribution with mean zero and covariance matrix R
_{
i
}. In addition, it is also assumed that b
_{
i
} and ε
_{
i
} are independent of one another. The LMM defines the covariances of the measurements in the subject by the covariances of the random effects (G
_{
i
}) and the covariances of the errors (R
_{
i
}). We used the estimators based on the restricted maximum likelihood (REML) method to construct the F statistics of the hypotheses since, in general, it yields less biased estimates of the variance components than those of maximum likelihood (ML) approach and avoids inflating type I error rates [12, 13].
The summary measure approach (SMA)
In this section, we describe how to apply the least squares regression slope and mean of response over time for each subject to test the effects of time, group and group × time interaction in repeated measures studies.
The slope of least squares regression line was applied to summarize the relationship between response and time for each subject or withinsubjects effect. If the pattern of individual profiles is linear or at least monotonic, the slopes can appropriately summarize the rate of change of response over time in the subjects. For repeated measures designs, the primary hypothesis is to test whether the pattern of change over time is the same across the k groups or no group × time interaction effect. Under the assumption of no interaction effect, the slopes in the k groups should not be significantly different. For this purpose, once the slopes are obtained for each subject, the ordinary k sample tests such as oneway ANOVA F or KruskalWallis (for k > 2) and Student's t or WilcoxonMannWhitney (for k = 2) can be employed to assess the equality of the slopes in the groups. If the test of interaction is not significant, one would be interested in assessing the main effects.
The hypothesis of no time (withinsubjects) effect states that all the m elements of the total mean vector (
) are identical. Under this assumption, the overall mean of the slopes in the population must be zero. To test this hypothesis, onesample t test can be applied to the sample slopes to assess the departure of mean slopes from zero.
For testing group (betweensubjects) effect, the mean of measurements over time for each subject is used as a summary measure. By analogy with the interaction effect case, the ordinary k sample tests are applied, but this time, to assess the equality of the individual means in the groups.
Permutation procedure can also be employed to assess the interaction and group effects where the constructive assumptions of the standard tests are not held or cannot be reasonably checked due to small sample sizes in the groups.
Simulation study
For the purpose of data simulation, a simple linear trend mixed model with a random coefficient only for the intercept and a two category grouping variable was considered. The model can be expressed as
where Y
_{
ij
} is the jth measurement from ith subject and X
_{i} is a grouping variable with the values 0 and 1, for i = 1,...,N and j = 1,...,m
_{
i
}.
Linear trend mixed model data was generated based on the model (3) with the same measuring time points t
_{
ij
} = t
_{
j
} = 2j for all the subjects, m
_{
i
} = m = 5, 10, and 20 measurements and β
_{
0
} = 2, in which the random effects, b
_{
0i
}, were assumed to be independently normally distributed with mean zero and standard deviation 0.25.
Since hypothesis testing effects related to withinsubjects effect is highly dependent on the number of measurements, the values of β
_{
2
} and β
_{
3
} are adjusted with respect to the m values. Different combinations of β
_{
1
}
, β
_{
2
} and β
_{
3
} were constructed to compute the empirical type I error rates and powers for testing the three effects.
We considered the following three covariance structures for errors to generate artificial data and fit the LMMs:

Simple or independent (IND): R
_{
i
}= σ
^{
2
}
I, where Iis an m × m identity matrix.

Firstorder autoregressive (AR1) with ρ = 0.7: R
_{
i
}= σ
^{
2
}
H, where H= [h
_{
jj'
}] is an m × m matrix with h
_{
jj'
}= ρ
^{jj'}for all j and j'.

Unstructured (UNS): R
_{
i
}= [r
_{
jj'
}] is an m × m covariance matrix with arbitrary structure.
For simplicity, we defined the true structures as those which were used to generate data and the working structures as those which were used to fit the model. In all the cases, it was assumed that the errors were normally distributed with zero mean and in the cases of IND and AR1, the error variances were fixed over time and equal to σ
^{
2
} = 0.5.
1000 sample data sets were generated for n
_{
1
} = n
_{
2
} = n
_{
3
} = 5, 10, 30 and 50 subjects under various choices of the above circumstances.
We have used free statistical software environment R to generate the artificial datasets and fit all of the approaches presented in the method section.