Using R or SAS, I want to fit the following Gaussian model: $$ \begin{pmatrix} y_{1j1} \\ y_{1j2} \\ y_{1j3} \\ y_{2j1} \\ y_{2j2} \\ y_{2j3} \end{pmatrix} \sim_{\text{i.i.d.}} {\cal N} \left( \begin{pmatrix} \mu_1 \\ \mu_1 \\ \mu_1 \\ \mu_2 \\ \mu_2 \\ \mu_2 \end{pmatrix} , \Sigma \right), j=1, \ldots n $$ with covariance matrix having the following structure: $$ \Sigma = \begin{pmatrix} \Sigma_0 & M \\ M & \Sigma_0 \end{pmatrix} $$ with $\Sigma_0$ a "compound symmetry" (exchangeable) covariance matrix and $M=\delta \begin{pmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{pmatrix}$, $\delta \in \mathbb{R}$. Importantly, I need a general exchangeable matrix $\Sigma_0$, with possibly negative correlation.

EDIT: In view of some comments (and even an answer) given below I should add a precision: I am not a beginner with PROC MIXED in SAS and nlme in R, and I know how to consult the documentations. But in spite of my experience I am not able to fit this model.

  • 1
    $\begingroup$ So what is your question? $\endgroup$ – MånsT May 3 '12 at 8:56
  • 2
    $\begingroup$ Obviously the question is: how to fit such a model with R or SAS ? $\endgroup$ – Stéphane Laurent May 3 '12 at 9:00
  • $\begingroup$ So you wish to estimate a covariance matrix $\Sigma_0$ based on two dependent vectors with known inter-covariances. Is $\delta$ known? $\endgroup$ – MånsT May 3 '12 at 9:24
  • $\begingroup$ All parameters are unknown. $\endgroup$ – Stéphane Laurent May 3 '12 at 9:41
  • $\begingroup$ There probably is a pre-existing package in R to fit this model (look into covariance structure models) but I don't know what it is - this seems more like the business of MPLUS. In any case, you can write down the likelihood, code it into R and maximize it using optim :) $\endgroup$ – Macro May 3 '12 at 15:10

You haven't told us how many data points you have. You need a certain number for the parameters to be estimable. I don't think that SAS has a proc that fits multivariate distributions per se but if you were using proc mixed and y is in the model these parameters would be calculated and could be printed out. You would have to specify the covariance structure.

  • 4
    $\begingroup$ The question is: how to specify this covariance structure ? $\endgroup$ – Stéphane Laurent May 3 '12 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.