turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Covariance of variances mixed model

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-27-2015 10:36 AM

I have the following model:

Yijk = alpha_i + beta_j + gamma_ij + error_ijk

alpha= effect of the ith individual, (RANDOM)

beta = effect of the jth treatment, (FIXED)

gamma = interaction of individual and treatment (RANDOM)

i =1, 2, ...n ; j = 1, 2, ... m ; k = 1, 2, ...r

Individual i in the jth treatment is measured r times.

I have been trying to get the covariances of the variances of beta and gamma, beta and error, gamma and error. That is,

Cov(Varbeta,Vargamma)

Cov(Varbeta,Varerror)

Cov(Vargamma,Varerror)

Here is my current code. It outputs the asymptotic covariances of random effects and the covariance matrix for fixed effects BUT does not provide the above 3 covariances.

proc mixed data=sociodat ASYCOV covtest METHOD=ML;

class trtment indiv;

model y = trtment/covb s;

random trtment trtment*indiv/G;

ods output CovParms=C;

run;

Thanks in advance for your guidance.

Best regards,

statz

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to statz

05-28-2015 11:25 AM

I moved your inquiry over to the SAS Statistical Procedures Community, where your question will be seen by more experts. Thank you for using SAS Online Communities! Hope to see more posts from you.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to statz

05-28-2015 02:53 PM

ASYCOV is giving you the var-cov matrix of the var-cov parameters. So, you ARE getting the desired terms in the output. Square the SE for one of the estimated variances (in the Cov Param table) and you will get the diagonal variance of the matrix in the ASYCOV table. The off diagonal elements of the latter are the covariances, such as Cov(var_alpha,var_gamma). However, your random term is not correct. Based on what you wrote, it should be

random indiv trtment*indiv / G;

Also, you need multiple observations within the treatment*individual combination for this to work, otherwise your model is overparameterized.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-29-2015 09:28 AM

Thanks Ivm. I had a typo in my first message and I actually used the following in my code:

random indiv trtment*indiv / G;

Using asycov, I could get the var-cov matrix only for the random effects. I could not get those covariances related to the fixed and random effects, specifically

Cov(Varbeta,Vargamma)

Cov(Varbeta,Varerror)

Cov(Vargamma,Varerror)

Thanks,

Statz

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to statz

05-29-2015 11:18 AM

I don't understand your question. There is no such thing as a covariance of a fixed effect with a random effect. A fixed effect is not a random variable, so there is no variance or covariance. That is, there is no Var_beta. Of course, there is a variance of the estimated betas, but this is a different concept. ASYCOV gives you the variance-covariance matrix of the estimated variance-covariance parameters only (var_alpha, and so on).