# Comparing groups - which test should I use

#### speedzeta

##### New Member
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?

#### bukharin

##### RoboStataRaptor
Compare the proportions to what?

#### speedzeta

##### New Member
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.

#### bukharin

##### RoboStataRaptor
Is is the same people who have had the mini mental done twice, or is it two independent groups of people?

#### speedzeta

##### New Member
Are the same people who have had the mini mental done twice

#### RedOwl

##### New Member
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-.

Code:
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:

#### bukharin

##### RoboStataRaptor
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.

#### RedOwl

##### New Member
@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 http://www.ats.ucla.edu/stat/stata/dae/ologit.htm and http://www.ats.ucla.edu/stat/stata/output/stata_ologit_output.htm.

Last edited:

#### bukharin

##### RoboStataRaptor
- 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

#### RedOwl

##### New Member
@bukharin,

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 http://www.jstor.org/discover/10.23...2&uid=70&uid=4&uid=3739256&sid=21102924459057.

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