### 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 {\mathit{Y}}_{\mathit{i}\mathit{h}}={\left({Y}_{i\mathit{1}h},\dots ,{Y}_{imh}\right)}^{T} denote the vector of *m* responses from the *i*th 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 {\mathit{\mu}}_{\mathit{h}}={\left({\mu}_{\mathit{1}h},\mathrm{...},{\mu}_{mh}\right)}^{T} and common covariance matrix *Σ*. The total mean vector is also defined as {\stackrel{\u0304}{\mathit{\mu}}}_{.}=\mathit{1}/k{\sum}_{h=\mathit{1}}^{k}{\mathit{\mu}}_{h}. If there is no additional covariate, one can use a profile model as

{\mathit{Y}}_{ih}={\mathit{\mu}}_{h}+{\mathit{\epsilon}}_{\mathit{i}\mathit{h}},

(1)

where the vector {\epsilon}_{\mathit{i}\mathit{h}}={\left({\epsilon}_{i\mathit{1}h},\mathrm{...},{\epsilon}_{imh}\right)}^{T} is the vector of error for the *i*th 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 *m-*1. If the test of interaction is not significant, the tests of the main effects are not confounded. In order to compute any MANOVA-type test statistics such as Wilk's lambda (*Λ*), the condition *N*-*k* >*m-*1 is necessary, where *N* is the total number of subjects. Otherwise, the estimated covariance matrix of the transformed responses would not be non-singular and positive-definite. To test time effect, one can investigate the equality of the *m* elements of the total mean vector ({\stackrel{\u0304}{\mathit{\mu}}}_{.}) using one-sample Hotelling's *T*
^{2} test on the *m*-1 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 MANOVA-type tests to compare the groups' mean vectors.

### Linear mixed model (LMM)

Let {\mathit{Y}}_{\mathit{i}}={\left({Y}_{i\mathit{1}},\mathrm{...},{Y}_{im}\right)}^{T} denote the *m*
_{
i
} × 1 vector of responses from the *i*th 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

{\mathit{Y}}_{\mathit{i}}={\mathit{X}}_{\mathit{i}}^{\mathit{T}}\mathit{\beta}+{\mathit{Z}}_{\mathit{i}}^{\mathit{T}}{\mathit{b}}_{i}+{\mathit{\epsilon}}_{i},

(2)

where {\mathit{X}}_{\mathit{i}}^{\mathit{T}} is an *m*
_{
i
} × *p* fixed-effects design matrix for the *i*th subject, *β*is a *p* × 1 vector of fixed-effects parameters for the population, *b*
_{
i
} is a *q* × 1 vector of random effects for the *i*th subject, {\mathit{Z}}_{\mathit{i}}^{\mathit{T}} is an *m*
_{
i
} × *q* random-effects design matrix for the *i*th subject with *q* ≤ *p*, and *ε*
_{
i
} is an *m*
_{
i
} × 1 vector of within-subject errors. The random-effects 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 within-subjects 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 one-way ANOVA *F* or Kruskal-Wallis (for *k* > 2) and Student's *t* or Wilcoxon-Mann-Whitney (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 (within-subjects) effect states that all the *m* elements of the total mean vector ({\stackrel{\u0304}{\mathit{\mu}}}_{.}) are identical. Under this assumption, the overall mean of the slopes in the population must be zero. To test this hypothesis, one-sample *t* test can be applied to the sample slopes to assess the departure of mean slopes from zero.

For testing group (between-subjects) 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

{Y}_{ij}={\beta}_{\mathit{0}}+{\beta}_{\mathit{1}}{X}_{i}+{\beta}_{\mathit{2}}{t}_{ij}+{\beta}_{\mathit{3}}\left({t}_{ij}\times {X}_{i}\right)+{b}_{\mathit{0}\mathit{i}}+{\epsilon}_{ij},

(3)

where *Y*
_{
ij
} is the *j*th measurement from *i*th 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
} = 2*j* 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 within-subjects 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 *I*is an *m* × *m* identity matrix.

• First-order autoregressive (AR1) with *ρ* = 0.7: *R*
_{
i
}= *σ*
^{2}
*H*, where *H*= [*h*
_{
jj'
}] is an *m* × *m* matrix with *h*
_{
jj'
}= *ρ*
^{|j-j'|}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.