# Pre and post with control: Difference in median

#### Marvin85

##### Member
I created the difference between pre and post UOF counts and then generate a variable that represents the median for each group. base on my calculations the median difference in pre is 2 UOF and post 2.

Thank you,
Marvin

Last edited:

#### spengel

##### New Member
Marvin, have you considered a nonparametric test, such as the Median Test or the Mann-Whitney-Wilcoxon? If I understand your experiment correctly, you would want to compare the experimental and control groups at baseline--to show that their medians are equal and that they are similar groups before any treatment. Then compare the post experimental with the control with respect to each group's median. The Median Test is only concerned with whether the median is above or below a common median. The Mann-Whitney-Wilcoxon looks at the ranks of each observation.

These tests assume that both groups come from the same distribution, whatever shape it is, but they differ only with respect to their medians. OK, just my initial thoughts. Hope that helps!

Steve

#### Marvin85

##### Member
Hi Steve,

Thank you so much for your reply. Just to give you some context of my design: My main task is to "test" if staff member who participated in the counseling sessions had fewer "Use of Force (UOF)" incidents in the 6 moths after the counseling session. I have a data set with the number of UOF incidents for the staff member in the 6 months before (pre) and after the counseling (post). I also have a control group (staff who didn't participate in the counseling sessions). So in total I have the pre UOF count the post UOF count and a group variable.
By conducting sign rank tests for each group separately, I concluded that UOF incidents significantly decreased in the two groups from pre to post. Now I would like to know if the staff who received the counseling (experimental group) reduced the number of UOF in a greater rate that staff in the control group. I just want to see if the counseling is more effective in reducing UOF incidents than no counseling at all. Someone recommended Poisson regression, but I guess this only test if the POST UOF incident is higher in the the experimental vs control group , controlling for pre UOF incidents. I know that that UOF at pre and post is high in the experimental group since they are the "trouble" staff. I just want to test if the difference between pre and post is statistically significant higher in the experimental compare to the control.

Any ideas?

#### spengel

##### New Member
To make sure I understand, do you have two sets of UOF count data for your control group: a set 6 months before the treatment and a set 6 months after the experimental group got treatment? Do you have four sets of data total?:

6 months pre (control)
6 months post (control)
6 months pre (experimental)
6 months post (experimental)

#### Marvin85

##### Member
Yes, thats correct, My data look something like this:

Code:
ID	UOFpre	UOFpost	Group
1	2	1	1
2	3	1	1
3	1	2	1
4	2	1	1
5	2	0	1
6	1	2	0
7	3	1	0
8	4	1	0
9	2	1	0
10	5	0	0

#### spengel

##### New Member
OK, that's good to know. Your design reminds me of a similar one where Analysis of Covariance (ANCOVA) was used. The pre-treatment counts for both groups can be a covariate. You would test if there are differences in the post-treatment scores of both groups while controlling for the pre-treatment scores. ANCOVA will adjust the means of both groups. You would see if there is a statistical difference in the adjusted means of the two groups.

I'm not an expert on ANCOVA, but it's what jumped out at me as I was understanding your design and research question. There are additional checks you should do to confirm if your ANCOVA model is valid, such as homogeneity of variance, normality, correlation of your covariate between independent and dependent variables, etc. If you can send me your file, I would like to run it just as a learning exercise. Hope that helps, Marvin.

Steve

#### Marvin85

##### Member
Thank you so much steve...I infact did an ANCOVA regression using Poisson (Poisson ANCOVA). Using Stata

Code:
. poisson PostUOF PreUOF Group,irr

Iteration 0:   log likelihood = -875.85322
Iteration 1:   log likelihood = -875.61156
Iteration 2:   log likelihood = -875.61138
Iteration 3:   log likelihood = -875.61138

Poisson regression                              Number of obs     =        338
LR chi2(2)        =     125.19
Prob > chi2       =     0.0000
Log likelihood = -875.61138                     Pseudo R2         =     0.0667

------------------------------------------------------------------------------
PostUOF |        IRR   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
PreUOF |   1.082344    .008646     9.91   0.000      1.06553    1.099423
Group |   1.249379   .0812125     3.43   0.001     1.099928    1.419137
_cons |   1.853692    .111252    10.28   0.000     1.647978    2.085085
------------------------------------------------------------------------------
However, it is my understanding that ANCOVA does not tell you if the difference between pre and post is greater by one group. It tells you if the incident at post examination is higher for one group compare to the other controlling for pre UOF. i think they answer difference questions. or not? SO my result for the Poisson model is : adjusting for pre-UOF incident rates and significant demographic covariates, post UOF incidents was 24% higher in the experimental group compare to the control (incidence rate ratio [IRR], 1.24; 95% confidence interval [CI], 1.0-1.53).