BookmarkSubscribeRSS Feed
Rover17
Fluorite | Level 6

Hi All,

 

I have a question about how to use proc varcomp when there are effects that reflect two levels of nesting. 

For my analysis, I have human raters nested in faculty, and faculty nested in departments. You can see my proc varcomp procedure below. SAS reports an error because it doesn't like the term of  Rater(Faculty(Department)) in the Model statement .  So, I am wondering if I specified the two levels of nesting correctly in the first place. 

 

proc varcomp  data = OneDrive.long_&Year._wide_c

     method = reml;

     class Department Faculty Rater item ;

     model Dependent = item  Department Faculty(Department)  Rater(Faculty(Department))  Department*item / FIXED=1;

run;

title;

 

Can someone please explain to me how to correct my code?

 

Could I correct it by replacing the term Rater(Faculty(Department)) with the two terms of Rater(Faculty) and Faculty(Department) instead? 

 

Thank you

2 REPLIES 2
sbxkoenk
SAS Super FREQ

6.4 - Fully Nested Random Effects Model: Quality Control Example
https://online.stat.psu.edu/stat502_fa21/lesson/6/6.4

 

You can do this with PROC MIXED or PROC VARCOMP or PROC NESTED.

 

Koen

StatsMan
SAS Super FREQ

You almost had the nesting syntax. For that second level of nesting, you need a(b c) instead of a(b(c)). 

sas-innovate-2024.png

 

Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.

 

Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 

 

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
  • 2 replies
  • 207 views
  • 1 like
  • 3 in conversation