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

Available on demand!

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

 

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