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?
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).
I am using SAS 9.3.
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.
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.
But you can get the polychoric correlation using PROC FREQ in older versions of SAS.
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!
You can try the old sas macro for polychoric correlations. Never used it, so you would be on your own.
Thanks!
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.