Programming the statistical procedures from SAS

Proc reg warning - Zero or negative sum of squares

Reply
Contributor
Posts: 20

Proc reg warning - Zero or negative sum of squares

Can't figure out how to address this warning...

WARNING: The variable l12_drop_giv_obchan_other has zero or negative sum of squares after being adjusted for the intercept, if there is one. Hence, it will not be used in any subset selection.

Then the procedure stops. My code is this...

proc reg data = input_dataset;
model dep_var = <<< 32 independent vars >>>
/ selection = rsquare adjrsq cp
best = 3
noint ;
run;

Funny thing is it runs fine when there are 31 variables, but not when I add more. And it doesn't seem to matter which variable I added. All the values in the variables appear to be fine. I can't seem to find any documentation about this warning.

Anyone have some ideas? Thank you.
Grand Advisor
Posts: 9,444

Re: Proc reg warning - Zero or negative sum of squares

Hi.
Do you use another selection method other than rsquare.
Such as:

/ selection = stepwise cp

/ selection = backward cp


I supposed that the model includes a lot of variables, So the Rsquare of model is almost to approach to one,when you add thirty-second var, the model cann't promote the Rsquare any more.



Ksharp Message was edited by: Ksharp
Contributor
Posts: 20

Re: Proc reg warning - Zero or negative sum of squares

I have not tried other selection methods, but I suppose I should try.

And the r2 is no where near 1 so that wouldn't be the prob.

Thanks for your thoughts.
Super Contributor
Posts: 281

Re: Proc reg warning - Zero or negative sum of squares

32 independent variables and no intercept? I certainly don't recommend doing that.

Can't add variable number 32, no matter what it is? Perhaps you have run out of degrees of freedom??

The whole idea of having 32 independent variables and then doing some variable selection is usually doomed to fail. A better approach, in my opinion, is something like Partial Least Squares regression, where you don't have to drop variables, and you find linear combinations of independent variables that are predictive of Y.
Ask a Question
Discussion stats
  • 3 replies
  • 706 views
  • 0 likes
  • 3 in conversation