Hello SAS community,
Currently I'm leaning towards some variations of Chi-Squares test. Particularly MH-Chisq but I would like to confirm before proceeding.
My data structure is as the following:
data have;
input StudyID location$ X1 X2;
datalines;
1 N 0 0
1 E 0 1
1 S 1 1
2 N 1 1
2 W 1 1
2 E 1 0
2 S 1 1
;
run;
I believe the ordinary Chi-Square test runs under the assumption that observations are independent. But in my case I believe the observations are correlated within subjects. Is there a variation of the chi-square test where it takes the correlated data into consideration?
Thank you in advance!
If each subject has only one pair of measurements at each location, then you could use the CMH option in PROC FREQ to test the association in the table stratified by location. For example:
proc freq;
table location*x1*x2 / cmh;
run;
If each subject has only one pair of measurements at each location, then you could use the CMH option in PROC FREQ to test the association in the table stratified by location. For example:
proc freq;
table location*x1*x2 / cmh;
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.