Comparing groups - which test should I use

My study is to assess the mental state of elderly patients, one of the objectives is to compare the mini-mental categories, which is an instrument that measures the level of cognition of classifying subjects into 4 categories: normal, pathological suspicion, deterioration and dementia, but I just need to compare the proportions of each of them to find significant differences.

Assess the normality of my data by shapiro wilk but are not normally distributed.

That is not parametric test would you recommend?
The objective is to see if significant differences exist between the proportion of insane persons evaluated in year 0 compared to the insane at 2 years.
Since you have paired samples (i.e., the same people measured at two times
on the same variable), you can use the McNemar test for paired proportions.
The Stata version that works with data in a data set is -mcc-. The Stata
version that works as an "immediate" or "interactive" command with summary
data is -mcci-.

help mcc
If you are not familiar with the NcNemar test, it similar to Chi-Square, but
Chi-Square can only be used on independent samples. When the samples
are paired (i.e., non-independent), you should use McNemar.
Last edited:


If you want to collapse your 4 categories into 2 (insane vs not insane), then McNemar's is a good approach. However, if you want to keep all 4 ordinal categories then it's a bit harder and I would recommend using a Friedman test. The best way to do this in Stata is with the user-written -emh- command, which you can download using:
ssc install emh

An example of its use was posted on Statalist by its author last year.
@bukharin, I agree completely. I read @speedzeta's original post too quickly and thought she had four separate variables rather than a single factor variable with four levels.

The post by @speedzeta was clear, so the misunderstanding about @speedzeta's variable(s) was completely mine.

Both the McNemar test I mentioned and the Friedman test suggested by @bukharin both ignore the apparent ordinal nature of the factor levels in @speedzeta's variable and therefore lose information. To address the ordinal nature of the factor variable, @speedzeta could use that factor as the outcome variable in an ordinal logistic regression (-help ologit- in Stata) and make the time period variable the predictor.

UCLA ATS has good help pages on -ologit- at and
Last edited:


Having thought about this some more, I disagree with both RedOwl and myself:
- Friedman test can be used for ordinal data
- but since it's a paired comparison you can just use a Wilcoxon signed rank test (-help signrank-). This would be by far the easiest approach
- a typical ordinal logistic regression would not take into account the paired nature of the data

This is not for the current poster but just for the dialogue between us.

You are right about -ologit- ignoring the paired nature of the data,
but I did want to mention that there are models of ordinal logit
that can handle paired comparisons with ordered categorical data.

See for example

This is an interesting discussion, but I do agree that the -signrank- test
will be fine for this poster's needs.