BookmarkSubscribeRSS Feed
dsougata82
Calcite | Level 5

Dear All,

While execution of PRINCOMP function in SAS message is coming as follows:

WARNING: The Correlation Matrix is not positive definite.

What is the significance and how to overcome.

Regards

Sougata Das.



3 REPLIES 3
Ksharp
Super User
Maybe some variables have linear correlation relation(multiple colinearity ). Drop some variables. Maybe you should use VARCOMP Procedure to check firstly .
dsougata82
Calcite | Level 5

Dear SIr,

 

   Thanks for reply.

 

I am doing comparison of five samples based on variables (having wide variation in numerical value and different in terms of units). Using only Score and Pattern plot for comparison. The total programme I followed stated below. 

 

******************************************************************************************************************************

data acidification;
input ExperimentNumber $1-5
LagPhase
TimeCurdFormation
pH_FourHour
pH_SixteenHour
RateMaxAcidification
TimeMaxAcidification
pH_MaxAcidification
TimeRangeFastAcidification
pHRangeFastAcidification
;
datalines;
Cntrl 48 253 4.729 4.185 -0.014 106 5.484 72 0.785
Ex-18 39 205 4.618 3.979 -0.018 83 5.617 68 0.948
Ex-20 39 267 4.762 4.127 -0.018 72 5.788 52 0.992
Ex-21 56 305 4.860 4.149 -0.017 91 5.808 58 0.682
Ex-22 42 302 4.837 4.155 -0.016 77 5.881 71 0.793
;
proc print data=acidification;
ods graphics on;
proc princomp data=acidification
Plots (ncomp=2)=pattern;
run;
ods graphics off;
ods graphics on;
proc princomp data=acidification
plots (ncomp=2)=score;
id ExperimentNumber;
run;
ods graphics off;

 

********************************************************************************************************************************************************

 

It is not possible to drop variables for me.

 

VARCOMP - procedures will alow to have plots like score/pattern?

 

Regards

Sougata Das

Ksharp
Super User

The number of obs is less than the number of variables, That doesn't look right. Your Matrix is singular , maybe that is the reason.

If you transpose them ,you will get rid of these WARRNING, but maybe that is not what you want.

 

data acidification;
input ExperimentNumber $1-5
LagPhase
TimeCurdFormation
pH_FourHour
pH_SixteenHour
RateMaxAcidification
TimeMaxAcidification
pH_MaxAcidification
TimeRangeFastAcidification
pHRangeFastAcidification
;
datalines;
Cntrl 48 253 4.729 4.185 -0.014 106 5.484 72 0.785
Ex-18 39 205 4.618 3.979 -0.018 83 5.617 68 0.948
Ex-20 39 267 4.762 4.127 -0.018 72 5.788 52 0.992
Ex-21 56 305 4.860 4.149 -0.017 91 5.808 58 0.682
Ex-22 42 302 4.837 4.155 -0.016 77 5.881 71 0.793
;
proc transpose data=acidification out=have;
var
LagPhase
TimeCurdFormation
pH_FourHour
pH_SixteenHour
RateMaxAcidification
TimeMaxAcidification
pH_MaxAcidification
TimeRangeFastAcidification
pHRangeFastAcidification;
run;
ods graphics on;
proc princomp data=have
Plots (ncomp=2)=pattern;
run;

proc princomp data=have
plots (ncomp=2)=score;
id _name_;
run;

Check Rick's blog about PRINCOMP.

http://blogs.sas.com/content/iml/2014/11/07/distribution-of-blood-types.html

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1791 views
  • 2 likes
  • 2 in conversation