BookmarkSubscribeRSS Feed
statz
Obsidian | Level 7

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

4 REPLIES 4
BeverlyBrown
Community Manager

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.

Couldn't attend SAS Innovate in person? We gotchu. Access on-demand content now!

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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.

statz
Obsidian | Level 7

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

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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).

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1528 views
  • 3 likes
  • 3 in conversation