BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
pmbrown
Quartz | Level 8

the covariance parameters are provided with se's, but it does not seem obvious if you can get the se's for the elements of the correlation matrix resulting from rcorr on the repeated statement (they are not provided in the rcorr ods). Are they available or can they be calculated by hand? You don't often see variance components presented with confidence intervals

1 ACCEPTED SOLUTION

Accepted Solutions
pmbrown
Quartz | Level 8

"So, is your issue that the CIs are given only for the covariances and not for the correlations?"

 

yes, i have repeated this in literally all of the above posts 🙂

 

i'm beginning to think the se can't be obtained for the correlation estimates, although I'm pretty sure both R and STATA can provide them, i wonder why SAS doesn't. 

View solution in original post

8 REPLIES 8
Rick_SAS
SAS Super FREQ

You can use the CL option on the PROC MIXED statement to get confidence intervals for the covariance parameters. The confidence limits are displayed as extra columns in the "Covariance Parameter Estimates" table. You can use the COVTEST option to get asymptotic standard errors. See this page of the doc: SAS Help Center: PROC MIXED Statement

 

If that doesn't answer your question, please show the statements that you are using.

pmbrown
Quartz | Level 8

Thanks Rick. It's the same code in this paper: Analyzing Multivariate Longitudinal Data Using SAS 

 

proc mixed data=CRISP_MIX covtest noclprint;
title1 "Model 1.1 Mixed model with a Kronoker product covariance";
title2 "KVS (X) versus CVS (Y)";
class pkdid vname visitc;
model val=vname*visit/s noint;
repeated vname visitc /type=un@ar(1) subject=pkdid r rcorr;
where vname="KVS" or vname="CVS";
run;

they display the correlations resulting from this model in the middle portion of the table

 

Capture.PNG

 

the SAS output displays se's for the cov parameters, but not for these correlation estimates. I wonder if they are obtainable

 

 

Rick_SAS
SAS Super FREQ

OK. So what happens if you add the CL option to the PROC MIXED statement?

pmbrown
Quartz | Level 8

Unfortunately the CI is not displayed when i add cl to the mixed statement. The correlations are presented in the output and in the rcorr ods in matrix form (making it tough to display the corresponding CIs), whereas the covariance parameters are displayed in a table, allowing the CIs to be presented alongside them. I can't show my particular output but it's exactly as seen in figures 32 and 33 here: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_mixed_examples02.htm. Thanks

 

edit: actually, it's not exactly like figure 32 because it is the correlation matrix, the heading looks like this:

Capture.PNG

Rick_SAS
SAS Super FREQ

For the example in the doc, if I add the CL option on the PROC MIXED statement, the output includes the confidence limits. However, perhaps the issue is that the CIs are not added to the R table ("Estimated R Matrix for Person 1") but to the CovParms table ("Covariance Parameter Estimates")? If you are using an ODS SELECT or ODS OUTPUT statement, make sure you are capturing the CovParms table. Here is the doc example with the CL option and an ODS statement that selects only the R and CovParms tables:

proc mixed data=pr method=ml covtest CL;
   class Person Gender;
   model y = Gender Age Gender*Age / s;
   repeated / type=un subject=Person r;
   ods select R CovParms;
run;

Rick_SAS_0-1706543469515.png

 

*UPDATE*: I see that you changed your last response. You are now using the RCORR option on the REPEATED statement and are looking at the RCORR ODS table. So, is your issue that the CIs are given only for the covariances and not for the correlations?

pmbrown
Quartz | Level 8

"So, is your issue that the CIs are given only for the covariances and not for the correlations?"

 

yes, i have repeated this in literally all of the above posts 🙂

 

i'm beginning to think the se can't be obtained for the correlation estimates, although I'm pretty sure both R and STATA can provide them, i wonder why SAS doesn't. 

Rick_SAS
SAS Super FREQ

I'm sorry if my questions have frustrated you. I was just trying to understand the issue. Perhaps one of the other experts will be able to answer your questions. Good luck!

SteveDenham
Jade | Level 19

If your errors are approximately normally distributed, you can use the value applied in the Fisher transformation of a correlation to a z-score. In the asymptotic case, this standard error is 1/sqrt(n-3), where n is the number of observations used.

 

SteveDenham

 

(Gotta admit this is something of a straw man answer, but it might stimulate some discussion).

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 8 replies
  • 1019 views
  • 0 likes
  • 3 in conversation