Hello,
Thank you in advance for your help. I am trying to a correlation between an ordinal variable and a grouped discrete variable using SAS studio. The first variable is (referred to as "Genome") is likert scale and has 3 levels (agree, undecided, and disagree). The second (referred to as "Events") has 5 levels (0-1, 2-3, 4-5, 6+). I have attached a spreadsheet with this data for reference. I want to know wether event attendance influences acceptance of certain technologies although am running into issues converting the ordinal variables to ranks. For example, I want the variables to be coded: (agree= 1, undecided= 2, disagree= 3) and ( 0-1=1, 2-3=2, 4-5=3 and 6+ =4). To my understanding converting the ordinal variables to ranks is the only way to correlate this data. Is it true?
Hello,
I would build a model (predicting the acceptance from event attendance).
You can do that with PROC LOGISTIC for example.
Or you can use CORRESPONDENCE analysis.
Correspondence analysis is a technique to uncover patterns and structures in categorical data.
SAS/STAT® 15.2 User's Guide
The CORRESP Procedure
Getting Started: CORRESP Procedure
https://go.documentation.sas.com/doc/en/statug/15.2/statug_corresp_gettingstarted.htm
Koen
For category variables, it is called association (correlation).
Try PROC FREQ.
or calling @StatDave
proc import datafile='c:\temp\Genome and Event Correlations.xlsx' out=have dbms=xlsx replace;
run;
proc freq data=have;
table genome*events/ chisq;
run;
See the descriptions of the Lambda and Uncertainty coefficients available from the MEASURES option in the FREQ procedure documentation. The variables in your data set can be used as is with no conversion. For example, the Uncertainty Coefficient (C|R) tells you that the Events variable explains about 4% of the uncertainty in the Genome variable.
Alternatively, if you assume that both are ordinal variables and you want to test whether increasing Events increases Genome, then use the JT option after making sure that the levels of both variables are in increasing order.
proc format;
value $ genf "Disagree"="1 Disgree" "Undecided"="2 Undecided" "Agree"="3 Agree";
run;
data z;
input Genome:$10. Events $;
datalines;
Undecided 4-5
Undecided 0-1
Agree 0-1
...
;
proc freq order=formatted;
format genome $genf.;
table events*genome/measures jt;
run;
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.