Programming the statistical procedures from SAS

PROC CALIS for polychoric correlations

Reply
Contributor
Posts: 27

PROC CALIS for polychoric correlations

Dear Sas experts, 

 

I am trying to confirm unideminsionality using polychoric correlations. I run this code: 

 

PROC CORR DATA=mydata OUTPLC=polyCorr ;
VAR Q1-Q13;
RUN;


PROC CALIS data=polyCorr outstat=ostat;
run;

 

The polyCorr file looks normal to me. But get the following error message:

ERROR: The sample covariance or correlation matrix is not positive definite. ML or GLS estimates cannot be computed.

 

Can anybody help?

Thank you

Julia

SAS Super FREQ
Posts: 3,547

Re: PROC CALIS for polychoric correlations

The most likely explanation is that your data contain missing values. By default PROC CORR computes pairwise correlations. Be sure to specify the NOMISS option on the PROC CORR statement, which will tell the procedure to perform listwise deletion of observations with missing values, which always results in valid correlation matrix.   For details, see "Missing values and pairwise correlations: A cautionary example"

 

 

Contributor
Posts: 27

Re: PROC CALIS for polychoric correlations

Unfortunately, it doesn't seem to be an issue. There are no missing values  (see the attached file) and NOMISS option also doesn't save the problem. Smiley Sad

Maybe other ideas?

SAS Super FREQ
Posts: 3,547

Re: PROC CALIS for polychoric correlations

Maybe not, but the root cause is the same: PROC FREQ is producing an estimate for a matrix that should (in theory) be SPD, but the estimate is created in a pairwise fashion, so the estimate is not necessarily SPD.

 

You can try to use more iterations or a tighter convergence criterion by using POLYCHORIC(converge=1e-6 maxiter=500), but I'm not confident that it will work.

 

From what I've read, if you have categorical variables with fewer than about 5 categories, the polychoric approximation (which uses assumes bivariate normality) just isn't very reliable.  For more about non-PD matrices, including a section on polychoric matrices, see "Not Positive-Definite Matrices -- Causes and Cures" 

Super User
Posts: 9,769

Re: PROC CALIS for polychoric correlations

Maybe you need the nearest correlation matrix to instead of your Non positive correlation matrix .

 

http://blogs.sas.com/content/iml/2012/11/28/computing-the-nearest-correlation-matrix.html

Ask a Question
Discussion stats
  • 4 replies
  • 533 views
  • 0 likes
  • 3 in conversation