Hello, I have a binary/categorical variable - Location. I would like to see if there is a statistical difference between the presence of complaints between the two locations.
For complaints I have the following values-
"." missing values denotes no complaint in the dataset.
1 denotes the presence of complaint
I was tilting towards using proc freq to do a chi-square test but wasn't sure. Can anyone please guide.
Here is the sample data.
data test;
infile datalines;
input customernum complaint location$;
datalines;
100 1 ND
200 . D
300 1 D
400 1 D
500 . ND
600 1 ND
700 1 D
800 1 D
900 . ND
1000 1 ND
1100 1 D
1200 1 D
1300 1 D
;
RUN;
Proc Freq and Chi-sq would be one of my first choices. With the data you show you would need to include the MISSING option on the tables statement so that missing is treated as a category for the Complaint variable.
Proc Freq and Chi-sq would be one of my first choices. With the data you show you would need to include the MISSING option on the tables statement so that missing is treated as a category for the Complaint variable.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.