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
- /
- Categorical variables have an identical level

- 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

11-15-2011 02:21 PM

I have a tricky question regarding a dataset. The dataset has 4 categorical variables with various categories. The trick thing is that they have one identical level (ie. 100% percectly correlated for this level).

This caused a problem for running a linear model. SAS said the matrix is singular and the estimate is not unique.

Is there any good idea to deal with this level?

Thanks in advance.

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

11-15-2011 03:44 PM

Are you saying that, for one variable, every record has the same value and/or that everyone in the same group has the same value? If so, why not just drop that variable from your analysis?

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

11-16-2011 10:01 AM

Thanks for your suggestion, art297.

The variables are not 100% perfectly correlated. Just a level of them. So I cannot remove variables.

I found a way to deal with that:

1) recode the levels of variables into 0, -1, 1 (effect coding);

2) Only keep one of the correlated levels in the final model.

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

11-15-2011 04:10 PM

I'm going to guess that all variables in the model are class variables and that the "problem" is a note that says:

Note: | The X'X matrix has been found to be singular, and a generalized inverse was used to solve the normal equations. Terms whose estimates are followed by the letter 'B' are not uniquely estimable. |

If so, there's nothing wrong with your model or data. You just need to understand how to interpret the parameter estimates. See this usage note: http://support.sas.com/kb/22/585.html

If this isn't the problem, post the error message that you get.