BookmarkSubscribeRSS Feed
SAS-questioner
Obsidian | Level 7

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!

1 REPLY 1
sbxkoenk
SAS Super FREQ

Hello,

 

In your first PROC CATMOD, you might need the ZERO= option behind the forward slash on the MODEL statement.


ZERO=keyword

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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 1 reply
  • 528 views
  • 0 likes
  • 2 in conversation