R language Access Menu

Title Text Both  

Analysis of Pre-Post Treatment-Control studies

This is a commonly used study design where two groups are studied, one receiving no treatment or placebo (control group) and other receiving active treatment (treatment group). Both groups are studied at baseline (pre values) and then again after a period of treatment (post values). In cross-over study design same subjects are part of 2 groups while in parallel study design, separate subjects form 2 groups.  The data may be tabled as follows: 

mydata 
subjectID    group        pre_post    value
1        control        pre        260
1        control        post        145
2        control        pre        254
2        control        post        125
3        active        pre        224
3        active        post        135
4        active         pre        287
4        active         post        154

dput(mydf)
structure(list(subjectID = c("control", "control", "control", 
"control", "active", "active", "active", "active"), group = c(NA, 
NA, NA, NA, NA, NA, NA, NA), pre_post = c("pre", "post", "pre", 
"post", "pre", "post", "pre", "post"), value = c(260L, 145L, 
254L, 125L, 224L, 135L, 287L, 154L)), .Names = c("subjectID", 
"group", "pre_post", "value"), class = "data.frame", row.names = c("1 1", 
"2 1", "3 2", "4 2", "5 3", "6 3", "7 4", "8 4"))

Mixed effects ANOVA may be the best for this design, since it takes into account the random effect of subjects involved. 

Code:

> library(lme4)
> library(lmeTest)
> summary(lmer(value ~ pre_post * group + (1 | subjectID), data=mydata))

 


    Comments & Feedback