Turn on suggestions

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

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Degrees of freedom in proc mixed

Options

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 04-16-2019 03:11 AM
(1191 views)

I'm a relatively new user to proc mixed and am running a model for a repeated measures mixed model comparing 2 methods of measurement (A and B). AR(1) is the assumed covariance structure for time and subjects have a pair of evaluations (A and B) at 3 time points. My interested is in comparing:

(a) the between-subject variability of each METHOD (obtained from the G matrix),

(b) the within-subject variability of each METHOD (obtained from the R matrix), and

(c) the overall variability of each METHOD (obtained from the V matrix of PTID=1; can also be obtained from a+b)

Can someone tell me how to get the degrees of freedom for these so that I can perform an F-test and make confidence intervals? Any help would be so appreciated. My code follows:

/* N=85 subjects (PTID). METHOD=A, B. TIME = 1, 2, 3 (some PTIDs have missing TIME at 2 or 3 ) */

proc mixed method=ml;

class PTID METHOD TIME;

model Y=METHOD / s ddfm=kr;

random METHOD / type=un subj=PTID v g;

repeated METHOD / type=un@ar(1) subj=TIME(PTID) r;

lsmeans METHOD / diff;

run;

4 REPLIES 4

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Have you looked at the COVTEST option on the PROC MIXED statement?

The example in Analyzing Multivariate Longitudinal Data Using SAS® appears to be similar to your study.

I hope this helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you for the suggestion but I want to compare the variability of the two methods: Var(Method a)=Var(Method b). The COVTEST option will test that each of the variances=0 so it doesn't quite get me to where I want to go. e.g.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I think you will have more flexibility with the GLIMMIX procedure with a judicious use of likelihood ratio tests of nested models, some of which can be implemented with the COVTEST statement and others which you'll have to do yourself. For example, you could fit one model with a common variance for methods and compare to a second model with separate variances for methods to test equality of variances. (You could take this approach with MIXED as well.)

GLIMMIX does not allow use of Kronecker products, but I don't see that as much of a problem because there are other modeling options. Advanced Techniques for Fitting Mixed Models Using SAS/STAT® Software (examples on page 5) may be illustrative. The GROUP option on the RANDOM statement might be useful.

I don't know of a way to get an F-test and a CI on the difference of variances directly from MIXED or GLIMMIX. I suppose you could bootstrap CIs. Or perhaps someone else in the Community has an idea.

This is an ambitious effort. Good luck!

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

**Available on demand!**

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

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.