Stuart-Maxwell / marginal homogeneity test help in R

130 Views Asked by At

I believe I need to use a Stuart-Maxwell mh test for my data because it is paired (before/after responses) and all categorical. There are 5 possible responses which people answered in a survey. I only have 2 columns (the before/after column and the answer column). There are 388 rows.

Example Data snippet:

Response     Action
Before     Option A
Before     Option C
Before     Option D  
Before     Option B
Before     Option E
Before     Option B 
After      Option A
After      Option B
After      Option E

I am not very familiar with using categorical data for both variables and am not sure how to convert my data to a matrix in order to use the StuartMaxwellTest(x) from the DescTools package or stuart.maxwell.mh(x) from the irr package (or any other method of comparing the before and after data for that matter).

Any input is appreciated.

0

There are 0 best solutions below