BookmarkSubscribeRSS Feed
Tiny_Kane
Obsidian | Level 7

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?

8 REPLIES 8
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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).

Tiny_Kane
Obsidian | Level 7

I am using SAS 9.3.

Tiny_Kane
Obsidian | Level 7

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.

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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.

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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

Tiny_Kane
Obsidian | Level 7

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!

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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

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
  • 8 replies
  • 2538 views
  • 0 likes
  • 2 in conversation