BookmarkSubscribeRSS Feed
bncoxuk
Obsidian | Level 7

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.

3 REPLIES 3
art297
Opal | Level 21

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?

bncoxuk
Obsidian | Level 7

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.

Rick_SAS
SAS Super FREQ

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1242 views
  • 3 likes
  • 3 in conversation