I have output values for my maximum likelihood analysis that are 1.00 and I have an error message that correlation matrix is singular. Where or what is the cause of these these 2 issues?
Datalines;
LC 0 0 0.024266667 0.015533333 0.02602 0.008633333 0.010333333 0.017233333 0 0.006366667 0.041333333 0.016933333 0.023333333 0.053833333
SK1 0.004966667 0.004966667 0.0078 0.005666667 0.008533333 0 0 0.0078 0 0 0.003566667 0.003566667 0.008593333 0.027133333
WR1 0.0042 0.0077 0.04 0.0175 0.02539 0.0063 0.0091 0.0224 0 0 0 0.0091 0.018216667 0.093156667
WR2 0 0 0.00595 0.00595 0.011833333 0.0042 0.00345 0.005326667 0.002176667 0 0 0.003733333 0.006066667 0.013743333
PI 0 0 0 0 0 0 0 0 0 0 0 0 0.006003333 0
;
title3 'Maximum Likelihood Factor Analysis with One Factor';
proc factor data=SsamPAHan method=ml heywood n=1;
title3 'Maximum Likelihood Factor Analysis with Two Factor';
proc factor data=SsamPAHan method=ml heywood n=2;
title3 'Maximum Likelihood Factor Analysis with Three Factor';
proc factor data=SsamPAHan method=ml heywood n=3;
NOTE: The data set WORK.SSAMPAHAN has 5 observations and 15 variables. WARNING: The number of observations is not greater than the number of variables. ERROR: Correlation matrix is singular. NOTE: Prior communality estimates will be 1.0. ERROR: METHOD=ML requires a nonsingular correlation matrix.
If you have 5 records and 15 variables, then mathematically, you are guaranteed to have a singular correlation matrix. So you can't do this analysis unless you have at least (I think) 15 records.
Can you show us the full complete log for this portion of code, with nothing chopped out? Please copy the log as text and paste it into the windows that appears when you click on the </> icon here. DO NOT SKIP THIS STEP.
Also, showing us the output would help.
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 Data SsamPAHan;
74 Input Site $ Ace Anthra Benzoaa Benzoapy
75 Benzobflu Benzoghi Benzokfluo Chry
76 Dibenzo Fluoran Fluorene Indeno123
77 Phenan Pyr;
78 Datalines;
NOTE: The data set WORK.SSAMPAHAN has 5 observations and 15 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
84 ;
85 title3 'Maximum Likelihood Factor Analysis with One Factor';
86 proc factor data=SsamPAHan method=ml heywood n=1;
87 title3 'Maximum Likelihood Factor Analysis with Two Factor';
WARNING: The number of observations is not greater than the number of variables.
ERROR: Correlation matrix is singular.
NOTE: Prior communality estimates will be 1.0.
ERROR: METHOD=ML requires a nonsingular correlation matrix.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE FACTOR used (Total process time):
real time 0.05 seconds
cpu time 0.05 seconds
88 proc factor data=SsamPAHan method=ml heywood n=2;
89 title3 'Maximum Likelihood Factor Analysis with Three Factor';
WARNING: The number of observations is not greater than the number of variables.
ERROR: Correlation matrix is singular.
NOTE: Prior communality estimates will be 1.0.
ERROR: METHOD=ML requires a nonsingular correlation matrix.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE FACTOR used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
90 proc factor data=SsamPAHan method=ml heywood n=3;
91
92
93
94
95
96
97 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
WARNING: The number of observations is not greater than the number of variables.
ERROR: Correlation matrix is singular.
ERROR: METHOD=ML requires a nonsingular correlation matrix.
109
NOTE: The data set WORK.SSAMPAHAN has 5 observations and 15 variables. WARNING: The number of observations is not greater than the number of variables. ERROR: Correlation matrix is singular. NOTE: Prior communality estimates will be 1.0. ERROR: METHOD=ML requires a nonsingular correlation matrix.
If you have 5 records and 15 variables, then mathematically, you are guaranteed to have a singular correlation matrix. So you can't do this analysis unless you have at least (I think) 15 records.
Thank you. I am reading up on matrices to insure that going forward I have the right conditions for the expected output.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.