BookmarkSubscribeRSS Feed
Rover17
Obsidian | Level 7

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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 428 views
  • 1 like
  • 3 in conversation