BookmarkSubscribeRSS Feed
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";
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;

 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



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

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


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!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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