BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
aalluru
Obsidian | Level 7

I'm trying to run a SAS code on a large dataset with 187 variables and 12927 observations as follows:

proc factor data=dealer_vars_imputed scree nfactors=5 out=all_dealers r=varimax method=ml;
run;

Apparently, method = ml requires a "non-singular correlation matrix" and I'm getting an error for it too. I'm not too sure about what that is and what exactly I'm supposed to do. Can someone help me out with this?

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

In the Cautions section of proc FACTOR documentation it says:

 

Singular correlation matrices cause problems with the options PRIORS=SMC and METHOD=ML. Singularities can result from using a variable that is the sum of other variables, coding too many dummy variables from a classification variable, or having more variables than observations.

Those are three things to look for.

 

Edit: Well, two things, actually, since you have more obs than variables, unless a great number of observations were excluded because of missing values.

PG

View solution in original post

4 REPLIES 4
PGStats
Opal | Level 21

In the Cautions section of proc FACTOR documentation it says:

 

Singular correlation matrices cause problems with the options PRIORS=SMC and METHOD=ML. Singularities can result from using a variable that is the sum of other variables, coding too many dummy variables from a classification variable, or having more variables than observations.

Those are three things to look for.

 

Edit: Well, two things, actually, since you have more obs than variables, unless a great number of observations were excluded because of missing values.

PG
aalluru
Obsidian | Level 7

I do have quite a few dummy variables so I guess that makes sense! I'll look into that. Thank you so much for your answer!

PaigeMiller
Diamond | Level 26

Why do you want to do factor analysis on data that has lots of dummy variables? Usually, you want to do factor analysis of continuous variables only, that makes more sense to me.

 

But, you can use PROC PRINQUAL to do something similar, which is specifically designed to work with categorical variables (and you don't have to specifically create the dummy variables first) as well as continuous variables.

--
Paige Miller
aalluru
Obsidian | Level 7

Hi! Thanks for the response! All the variables in my dataset are continuous now but I still seem to be getting the same error

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2380 views
  • 0 likes
  • 3 in conversation