Hi, I am trying to compare two surveys, the two surveys were answered by same bunch of people, which means one person answered two surveys at the same day. The two surveys are all 5 point-likert scale(but for another survey, it seems no one picked 5), and I want to compare them. I used Bhapkar's test because it can used to compare two repeated variables with more than two categories, and I used the below codes:
proc catmod data=check_fix;
response marginals;
model X*Y = _response_ / oneway;
repeated carc 2 / _response_=carc ;
run;
But it had error
ERROR: The number of response functions per population, 7, is not a multiple of the product of the number of levels of the factors, 2. You may need the PROFILE option if the design is not a complete factorial.
So, I tried to add profile in the code:
proc catmod data=check_fix;
response marginals;
model X*Y = _response_ / oneway;
repeated carc 2 / _response_=carc
profile=(1 1,
1 2,
1 3,
2 1,
2 2,
2 3,
3 1,
3 2,
3 3,
4 1,
4 2,
4 3,
4 4,
5 1,
5 2,
5 3,
5 4);
run;
But it also had error:
ERROR: The number of response functions, 7, must be a multiple of the number of rows in the PROFILE matrix, 17.
I have no idea what's going on. Can I use this procedure or are there any other methods that I can use to analyze my data? Thank you!
Hello,
In your first PROC CATMOD, you might need the ZERO= option behind the forward slash on the MODEL statement.
specifies whether a nonmissing cell with zero weight in the data set is treated as a sampling or structural zero.
You can also take a PROC FREQ approach (calculating agreement measures).
Koen
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.