Programming the statistical procedures from SAS

Why does PROC CORR fail to calculate Polychoric correlation

Reply
Contributor
Posts: 61

Why does PROC CORR fail to calculate Polychoric correlation

I want to calculate Polychoric correlation  by using PROC CORR. My code is

proc corr data=adbttforcfa POLYCHORIC;

var adbtt_dom_1b adbtt_dom_2b adbtt_dom_3b adbtt_dom_4b adbtt_dom_5b adbtt_dom_6b adbtt_dom_7b adbtt_dom_8b;

title 'correlation for items of factor isolated';

run;

But it failed, SAS log showed error message like:

20  proc corr data=adbttforcfa POLYCHORIC;

                                ----------

                                22

                                202

ERROR 22-322: Syntax error, expecting one of the following: ;, (, ALPHA, BEST, COV, CSSCP, DATA, EXCLNPWGT, FISHER, HOEFFDING,

              KENDALL, NOCORR, NOMISS, NOPRINT, NOPROB, NOSIMPLE, OUTH, OUTK, OUTP, OUTS, PEARSON, PLOTS, POLYSERIAL, RANK,

              SINGULAR, SPEARMAN, SSCP, VARDEF.

ERROR 202-322: The option or parameter is not recognized and will be ignored.

521  var adbtt_dom_1b adbtt_dom_2b adbtt_dom_3b adbtt_dom_4b adbtt_dom_5b adbtt_dom_6b adbtt_dom_7b adbtt_dom_8b;

522  title 'correlation for items of factor isolated';

523  run;

What is the reason?? PROC CORR cannot produce Polychoric correlation?

Valued Guide
Valued Guide
Posts: 684

Re: Why does PROC CORR fail to calculate Polychoric correlation

What version of SAS are you using? POLYCHORIC definitely works in 9.3 and 9.4. I don't know when it was added (it was not in old version 8).

Contributor
Posts: 61

Re: Why does PROC CORR fail to calculate Polychoric correlation

I am using SAS 9.3.

Contributor
Posts: 61

Re: Why does PROC CORR fail to calculate Polychoric correlation

OTE: Copyright (c) 2002-2010 by SAS Institute Inc., Cary, NC, USA.

NOTE: SAS (r) Proprietary Software 9.3 (TS1M1)

      Licensed to UNIV OF MASSACHUSETTS MEDICAL SCHOOL - SFA T&R, Site 70118457.

NOTE: This session is executing on the X64_7PRO  platform.

Valued Guide
Valued Guide
Posts: 684

Re: Why does PROC CORR fail to calculate Polychoric correlation

Looks like the option only appeared with STAT 12.1 (or later), which was still part of 9.3. Your version (TS1M1) doesn't have it. I just checked. You will need a newer version of SAS for this.

Valued Guide
Valued Guide
Posts: 684

Re: Why does PROC CORR fail to calculate Polychoric correlation

But you can get the polychoric correlation using PROC FREQ in older versions of SAS.

Contributor
Posts: 61

Re: Why does PROC CORR fail to calculate Polychoric correlation

Hi~ Proc freq can give me polychoric correlation. However, I have more than two variables, therefore I want to get a correlation matrix...But it seems like PROC FREQ cannot make the matrix...Do you have any idea to solve it? Thank you in advance!

Valued Guide
Valued Guide
Posts: 684

Re: Why does PROC CORR fail to calculate Polychoric correlation

You can try the old sas macro for polychoric correlations. Never used it, so you would be on your own.

http://support.sas.com/kb/25/010.html

Contributor
Posts: 61

Re: Why does PROC CORR fail to calculate Polychoric correlation

Thanks!

Ask a Question
Discussion stats
  • 8 replies
  • 418 views
  • 0 likes
  • 2 in conversation