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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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