3

Is it possible to specify a variance matrix for the random effects in PROC MIXED with the only restriction that the diagonal entries are equal ? I took a look in the help and I have not found, but this seems strange because such a variance structure is rather natural in some applications.

(EDIT) Consider for instance such a dataset:

> dat
   Subject Dose   y
1        1    A  10
2        1    A  11
3        1    A  12
4        1    B  30
5        1    B  31
6        1    B  32
7        1    C 100
8        1    C 101
9        1    C 102
10       2    A  11
11       2    A  14
12       2    A  13
13       2    B  33
14       2    B  37
15       2    B  36
16       2    C 105
17       2    C 110
18       2    C 109
19       3    A   9
20       3    A  11
21       3    A  12
22       3    B  30
23       3    B  35
24       3    B  32
25       3    C 115
26       3    C 101
27       3    C 102

dataplot

and the following model:

PROC MIXED DATA=dat ;
    CLASS SUBJECT DOSE ;
    MODEL y = DOSE ;
    RANDOM DOSE / subject=SUBJECT type=MYMATRIX ;
RUN; QUIT;

I want a matrix "MYMATRIX" with the same variance for each level of the DOSE factor, but not a compound symmetry matrix because the correlation between the means of the levels are different.

(EDIT2) The mathematical meaning of this model is the following one. Denoting by $i$ the index for the dose level and by $j$ the index for the subject, one has $$(y_{ijk} | \mu_{ij}) \sim_{\text{iid}} {\cal N}(\mu_{ij}, \sigma^2_w), \quad k=1, \ldots, 3 \quad \text{ for all } i,j$$ and $$ \begin{pmatrix} \mu_{1j} \\ \mu_{2j} \\ \mu_{3j} \end{pmatrix} \sim_{\text{iid}} {\cal N}_3 \left( \begin{pmatrix} \mu_1 \\ \mu_2 \\ \mu_3 \end{pmatrix}, G \right), \quad j=1, \ldots, 3$$ The diagonal entries of the $G$ matrix are the between variances for each level of the dose. I want $G$ to be of the form $$G=\begin{pmatrix} \sigma^2_b & \sigma_{12} & \sigma_{13} \\ \sigma_{12} & \sigma^2_b & \sigma_{23} \\ \sigma_{13} & \sigma_{23} & \sigma^2_b \end{pmatrix}$$

Stéphane Laurent
  • 17,425
  • 5
  • 59
  • 101

1 Answers1

1

If I do understand your model, you have a random dose effect for each subject:

$$ \gamma = \left( \begin{array}{c} \gamma_{1A} \\ \gamma_{1B} \\ \gamma_{1C} \\ \gamma_{2A} \\ \gamma_{2B} \\ \gamma_{2C} \\ \gamma_{3A} \\ \gamma_{3B} \\ \gamma_{3C} \\ \end{array} \right), $$ and $G = \textrm{Var}(\gamma)$ has a block-diagonal structure with identical blocks over subjects: $$ G = \left( \begin{array}{ccc} \star & \star & \star & 0 & 0 & 0 & 0 & 0 & 0 \\ \star & \star & \star & 0 & 0 & 0 & 0 & 0 & 0 \\ \star & \star & \star & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & \star & \star & \star & 0 & 0 & 0 \\ 0 & 0 & 0 & \star & \star & \star & 0 & 0 & 0 \\ 0 & 0 & 0 & \star & \star & \star & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & \star & \star & \star \\ 0 & 0 & 0 & 0 & 0 & 0 & \star & \star & \star \\ 0 & 0 & 0 & 0 & 0 & 0 & \star & \star & \star \end{array} \right). $$

Now, the type option specifies the covariance structure of each block. If you specify type=vc (default) then each block will have the form $$ \left( \begin{array}{ccc} \star & \star & \star \\ \star & \star & \star \\ \star & \star & \star \end{array} \right) = \left( \begin{array}{ccc} \sigma_{_{G}}^{2} & 0 & 0 \\ 0 & \sigma_{_{G}}^{2} & 0 \\ 0 & 0 & \sigma_{_{G}}^{2} \end{array} \right), $$ where $\sigma_{_{G}}^{2}$ is the single parameter of $G$ to be estimated. If you specify type=toep then $$ \left( \begin{array}{ccc} \star & \star & \star \\ \star & \star & \star \\ \star & \star & \star \end{array} \right) = \sigma_{_{G}}^{2} \left( \begin{array}{ccc} 1 & \rho_1 & \rho_2 \\ \rho_1 & 1 & \rho_1 \\ \rho_2 & \rho_1 & 1 \end{array} \right), $$ and now there are three parameters in $G$ to be estimated.

$$$$

If this does not fit your requirement, then you might want to have a look at the group option: all observations having the same level of the group effect have the same covariance parameters.

ocram
  • 19,898
  • 5
  • 76
  • 77
  • Thank you. In regards to your PS, you're wrong. I will edit my post to make it clearer. The Toeplitz matrix is not appropriate because of $\sigma_{12}=\sigma_{23}$. – Stéphane Laurent Jun 22 '12 at 07:00
  • Indeed, the Toeplitz does not fully fit what you want. But is sigma12=sigma23 totally unreasonable? Otherwise, I am afraid you have to go to 'type=un' which is a little bit more general than your G matrix... – ocram Jun 22 '12 at 07:31
  • Another motivation for the equality of the diagonal variances is that I assume $y = \log x$ and then taking the exponential of some confidence bounds for $\mu_1-\mu_2$ gives a confidence interval about the ratio of the means of the $x$ response. This is not true without assuming equality of variances. – Stéphane Laurent Jun 22 '12 at 07:35
  • Indeed it is not totally unreasonable to assume $\sigma_{12}=\sigma_{23}$. This is what I will do because this is the best available option. But my post is about a way to relax this assumption. – Stéphane Laurent Jun 22 '12 at 09:23
  • @Stéphane Laurent: I know it is possible to provide your own G matrix to proc mixed, but I am not sure it is possible for that matrix to depend on parameters. So, another possibility is to estimate the variance components in a separate statistical analysis, if possible, and to provide the resulting fully determined matrix to proc mixed... – ocram Jun 22 '12 at 09:32
  • Yes but if I specify a G matrix with known parameters this does not yield the correct standard errors and degrees of freedom for the fixed parameters (I think). – Stéphane Laurent Jun 22 '12 at 09:41
  • 1
    @Stéphane Laurent: http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_mixed_sect036.htm – ocram Jun 22 '12 at 09:46
  • Thanks. I hope one day I will try GDATA with a simple example. Now I have to advance in my work (with the Toeplitz matrix ;) – Stéphane Laurent Jun 22 '12 at 10:55
  • Ok, good work ;-) – ocram Jun 22 '12 at 11:13