BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
GSD
Calcite | Level 5 GSD
Calcite | Level 5

Hi All,

I am using the following SAS to code to compute the variance components of four categorical variables. I need to compute the R2 of the model. Can I directly use the Sum Squares Error and Sum Squares Total given in the output or should I be using a different technique?

proc sort data=ANOVATEST;

by Y I_Code C_name S_C;

proc nested data=Anovatest;

class Y I_Code C_name S_C;

var S_RA;

run;

quit;

In the above, S_RA is a continuous variable and Y represents year, I_Code C_name S_C are categorical variables representing effects.

Variance SourceDFSum of Squares
Total234368120.03
Y1111.704
I_Code785626.329
C_Name187356542.12
S_C3532893.299
Error37346.5771

Thanks in advance for your time.

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

Without testing, R^2 = (TSS - ESS)/TSS.  Explained variation over total variation.

Steve Denham

View solution in original post

1 REPLY 1
SteveDenham
Jade | Level 19

Without testing, R^2 = (TSS - ESS)/TSS.  Explained variation over total variation.

Steve Denham

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 1318 views
  • 0 likes
  • 2 in conversation