BookmarkSubscribeRSS Feed
samer_badri75
Quartz | Level 8

Lack of Fit.PNG

data d;
   input Day Temp RH;
   label Day = "Reaction Day (Hours)"
         Temp = "Temperature (Degrees Centigrade)"
         RH  = "Percent of humidity";
   datalines;
15	24	78
12	24	79
15	24	78
11	24	79
13	22	75
14	22	75
14	22	75
13	22	75
9	30	74
10	30	74
10	30	74
10	30	74
11	26	62
10	25	62
10	26	62
11	26	62





;
ods graphics on;
proc rsreg data=d plots=(ridge surface);
   model Day=RH Temp / lackfit;
   ridge max;
run;



 Greeting All

I used the SAS code got blank for Lack of Fit, Is there something wrong with the data? If I got a lack of fit significant what is the other method to get a better model.

 

Thanks in advance

 

2 REPLIES 2
mkeintz
PROC Star

I think it's blank because the degrees of freedom attributable to lack-of-fit is zero.

 

According to the wikipedia article Lack-of-fit sum of squares the degrees of freedom for lack of fit is n-p, where

  • n is the number of levels of independent variables (you have 6 such levels - i.e. 6 combinations of RH and TEMP).
  • p is the number of parameters.   I see your model allocates 5 degrees of freedom to the model.  Since rsreg shows zero df for lack-of-fit, I guess it adds 1 df for an intercept  term - yielding p=6.
--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
samer_badri75
Quartz | Level 8
Many thanks
I will try that
Have a great day

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1357 views
  • 1 like
  • 2 in conversation