Programming the statistical procedures from SAS

Computation of R2 using Proc Nested

Accepted Solution Solved
Reply
GSD
N/A
Posts: 1
Accepted Solution

Computation of R2 using Proc Nested

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.


Accepted Solutions
Solution
‎11-24-2014 11:36 AM
Respected Advisor
Posts: 2,655

Re: Computation of R2 using Proc Nested

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

Steve Denham

View solution in original post


All Replies
Solution
‎11-24-2014 11:36 AM
Respected Advisor
Posts: 2,655

Re: Computation of R2 using Proc Nested

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

Steve Denham

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 133 views
  • 0 likes
  • 2 in conversation