- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.