# comparing paired data between two groups

I collected 30 cases of paired data which includes serum creatinine before&after taking specific medication. And the cases are divided into two groups A and B each of which has different medical history. Group A has 10 paired data and Group B has 20 paired data.

Both two group has slightly increasing trend of serum creatinine. And I want to verify that even though both group has increasing trend, they are not statistically relevant. And Group A and Group B have similar trend of change. That the medication is not affecting the serum creatinine level.

In my opinion, paired T-test for each group can explain the increasing trend within each group. But my question is how do I compare the two groups? Should I use the Correlation anaylysis and compare the Pearson's coefficient? Or shoud I use ANOVA to compare the two groups?

• Please state your goal more clearly. On the one hand, you say that you want to show that for each group the change in serum creatinine is not significant. On the other hand, you say that you want to compare the two groups. Jul 19 at 7:44

You can use a repeated measures model with an interaction term - repeated-measures ANOVA or repeated-measures mixed effects model. With a group variable (Group) and a time variable (Time), representing the two occasions on which measurements were taken, a mixed effects model could be written as follows in the R language:

library(lmer)
model<- lmer(creatinine ~ Group * Time + (1|Id), data=data)
summary(model)


The (1|Id) term represents a random intercept to account for repeated measures. Id is a variable with a participant identifier.

In short, if the interaction term is non-significant, you could conclude that there is no evidence to support a difference in slopes between the two groups. If the effect of time is not sigificant, you can conclude that creatinine did not change sigificantly in the entire sample.

Of course, this model could be fitted with anotehr software. You would need to check the relevant assumptions. Getting log values of creatinine would likely normalize its distribution.

If you are only interested in comparing the A and B group you, and the data you have are metric (I am not familiar with serum creatinine measurements) you can just calulate differences before and after the treatment, giving you 10 differences for group A and 20 differences for group B. Then run a two sample t-Test on these new data.

If you are also interested in the change within groups you can, as you pointed out, use a paired t-test, which does the differences behind the scenes and then runs a one-sample t-test. You should then however account for multiple testing by using a smaller significance level (here: $$\frac{\alpha}{3}$$ instead of $$\alpha$$).