turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- PROC REG setting values to 0

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-23-2012 01:35 PM

I am getting the following notes using PROC REG in my output:

Model is not full rank. Least-squares solutions for the parameters are not unique. Some statistics will be misleading. A reported DF of 0 or B means that the estimate is biased. |

The following parameters have been set to 0, since the variables are a linear combination of other variables as shown. |

other = | Intercept - lung - heart - esrd |

female = | Intercept - male |

other_race = | Intercept - white_race - black_race - hisp_race |

The three groups of variables as part of the model are being used as flags, where one and only one of the variables can have a value of 1, and the others 0

(example:If Male is 1, Female is 0 and vice versa). Other variables listed in the model statement are non-binary.

Code looks as follows:

proc reg data=data alpha=.05;

model age=risk_score living lung heart esrd other count_visits male female white_race black_race hisp_race other_race median_income pop_density pct_rental;

plot predicted.*residual. / name=Graph1;

quit;

run;

I am not a statistician, so I can't really explain to my client what is happening. Why is SAS setting the "other" values to 0? I am getting the same behavior (same MODEL) using

PROC AUTOREG.

Accepted Solutions

Solution

01-23-2012
01:39 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-23-2012 01:39 PM

You've overparameterized your model. Basically, if you have a categorical variable such as male/female you only include one in the model not both otherwise the second will get set to 0. Same issue with race.

You can check any intro regression text on how to code categorical variables or see here:

http://www.ats.ucla.edu/stat/sas/webbooks/reg/chapter5/sasreg5.htm

All Replies

Solution

01-23-2012
01:39 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-23-2012 01:39 PM

You've overparameterized your model. Basically, if you have a categorical variable such as male/female you only include one in the model not both otherwise the second will get set to 0. Same issue with race.

You can check any intro regression text on how to code categorical variables or see here:

http://www.ats.ucla.edu/stat/sas/webbooks/reg/chapter5/sasreg5.htm

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-23-2012 01:46 PM

Do those variables really need to be removed? I don't think so. This is parameterized the same way GLM would if GENDER and RACE were CLASS variables.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-23-2012 03:02 PM

I mean if you have male and female, then you include only one of male or female, not both male and female, ie if you have a binary variable called sex where 0=Male, 1=Female that would be the same.

The errors above are SAS correcting for this, and the estimates that are left in appear correct, but I like to specify the coding in case the defaults aren't what I'd want to see. And to avoid error messages.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-23-2012 04:36 PM

I don't see any ERROR messages?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-23-2012 04:49 PM

Sorry, NOTES not ERRORS in the log. The docs do say the defaults are an overparameterized model as well.

"There are more columns for these effects than there are degrees of freedom for them; in other words, PROC GLM is using an over-parameterized model."

Whether or not you should remove them is a matter of opinion I suppose.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-08-2015 07:37 AM

Hi,

I am getting the same error message:

**Model is not full rank. Least-squares solutions for the parameters are not unique. Some statistics will be misleading. A reported DF of 0 or B means that the estimate is biased. **

**The following parameters have been set to 0, since the variables are a linear combination of other variables as shown.**

The structure of my model is like this:

sales=f(price,qtr_id)

qtr_id stretches from t4 to t11 (they are binary values, with only one of them equal to 1, rest 0 for a row - like identity matrix).

However, it says that t11 is a linear combination of intercept and t4-t10.

Any reason why this is happening?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-08-2015 10:26 AM

It is the same problem as above. If your data runs from t4 to t11, you must leave out one of the periods. Otherwise, you have overparameterized your model. Simply, leave out the qtr_id for, say, t4 and SAS will estimate your model correctly.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-23-2012 01:47 PM

I have been using SAS for close to 18 years but have just begun dabbling in SAS/STAT. I'll take a look at the webpage

you suggested. Thanks!