Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

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.

share|improve this question
1  
So what is your question? – MånsT May 3 '12 at 8:56
2  
Obviously the question is: how to fit such a model with R or SAS ? – Stéphane Laurent May 3 '12 at 9:00
So you wish to estimate a covariance matrix $\Sigma_0$ based on two dependent vectors with known inter-covariances. Is $\delta$ known? – MånsT May 3 '12 at 9:24
All parameters are unknown. – Stéphane Laurent May 3 '12 at 9:41
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 :) – Macro May 3 '12 at 15:10
show 4 more comments

1 Answer

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.

share|improve this answer
2  
The question is: how to specify this covariance structure ? – Stéphane Laurent May 3 '12 at 15:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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