Overall treatment effects

library(foreign)

dt1 <- read.spss('PTMAD_YAAD-P_subjects_abbrev.sav')
dt1 <- as.data.frame(dt1)

dt2 <- read.spss('PTMAD_YAAD-P_visits_abbreviated.sav')
## Warning in read.spss("PTMAD_YAAD-P_visits_abbreviated.sav"): Undeclared
## level(s) 0, 1, 2, 3, 4, 6, 8, 10, 12 added in variable: VISIT
dt2 <- as.data.frame(dt2)

library(ggplot2)
p1 <- ggplot(data = dt1, 
             aes(TxArm, BDITOT.0)) + 
    geom_boxplot(aes(fill = TxArm)) +
    ylab("BDITOT-Beck depression score") +
    xlab("Overall treatment effect")
p1
## Warning: Removed 1 rows containing non-finite values (stat_boxplot).

p5 <- ggplot(data = dt2,
             aes(VISIT, BDITOT)) +
    geom_boxplot(aes(fill = TxArm)) + 
    ylab("BDITOT-Beck depression score") +
    xlab("Treatment effects by week")
p5
## Warning: Removed 1 rows containing non-finite values (stat_boxplot).

p2 <- ggplot(data = dt1, 
             aes(TxArm, OCDS.0)) + 
    geom_boxplot(aes(fill = TxArm)) +
    ylab("Obsessive compulsive drinking scale") +
    xlab("Overall treatment effect")
p2

p6 <- ggplot(data = dt2,
             aes(VISIT, OCDS)) +
    geom_boxplot(aes(fill = TxArm)) + 
    ylab("Obsessive compulsive drinking scale") +
    xlab("Treatment effects by week")
p6

Sex difference on treatment

p3 <- ggplot(data = dt1, 
             aes(TxArm, BDITOT.0)) + 
    geom_boxplot(aes(fill = TxArm)) +
    facet_wrap(~SEX) +
    ylab("BDITOT-Beck depression score") +
    xlab("Effect of Sex on treatment")
p3
## Warning: Removed 1 rows containing non-finite values (stat_boxplot).

p7 <- ggplot(data = dt2,
             aes(SEX, BDITOT)) +
    geom_boxplot(aes(fill = TxArm)) + 
    ylab("BDITOT-Beck depression score") + 
    xlab("Effect of Sex on treatment by week") +
    facet_wrap(~VISIT)
p7
## Warning: Removed 1 rows containing non-finite values (stat_boxplot).

p4 <- ggplot(data = dt1, 
             aes(TxArm, OCDS.0)) + 
    geom_boxplot(aes(fill = TxArm)) +
    facet_wrap(~SEX)+
    ylab("Obsessive compulsive drinking scale") +
    xlab("Effect of Sex on treatment")
p4

p8 <- ggplot(data = dt2,
             aes(SEX, OCDS)) +
    geom_boxplot(aes(fill = TxArm)) + 
    ylab("Obsessive compulsive drinking scale") + 
    facet_wrap(~VISIT) +
    xlab("Effect of Sex on treatment by week")
p8

Race difference on treatment

p9 <- ggplot(data = dt1, 
             aes(TxArm, BDITOT.0)) + 
    geom_boxplot(aes(fill = TxArm)) +
    facet_wrap(~Race) +
    ylab("BDITOT-Beck depression score") +
    xlab("Effect of Race on treatment")
p9
## Warning: Removed 1 rows containing non-finite values (stat_boxplot).

p10 <- ggplot(data = dt2,
             aes(Race, BDITOT)) +
    geom_boxplot(aes(fill = TxArm)) + 
    ylab("BDITOT-Beck depression score") + 
    facet_wrap(~VISIT) +
    xlab("Effect of Race on treatment by week")
p10
## Warning: Removed 1 rows containing non-finite values (stat_boxplot).

p11 <- ggplot(data = dt1, 
             aes(TxArm, OCDS.0)) + 
    geom_boxplot(aes(fill = TxArm)) +
    facet_wrap(~Race)+
    ylab("Obsessive compulsive drinking scale") +
    xlab("Effect of Race on treatment")
p11

p12 <- ggplot(data = dt2,
             aes(Race, OCDS)) +
    geom_boxplot(aes(fill = TxArm)) + 
    ylab("Obsessive compulsive drinking scale") + 
    facet_wrap(~VISIT) +
    xlab("Effect of Race on treatment by week")
p12

Association between age and alcohol consumption variables

library(grid)
library(Rmisc)
## Loading required package: lattice
## Loading required package: plyr
p13 <- ggplot(data=dt2, aes(AGE, DperWk)) +
    geom_point()+stat_smooth(method="lm")
p14 <- ggplot(data=dt2, aes(AGE, DperDday)) +
    geom_point()+stat_smooth(method="lm")
p15 <- ggplot(data=dt2, aes(AGE, DayPerWk)) +
    geom_point()+stat_smooth(method="lm")
p16 <- ggplot(data=dt2, aes(AGE, HvyPerWk)) +
    geom_point()+stat_smooth(method="lm")
multiplot(p13, p14, p15, p16, cols=2)

cor(dt2[, 7], dt2[,c(13:16)])
##         DperWk  DperDday  DayPerWk   HvyPerWk
## [1,] 0.1631011 0.1806069 0.2122513 0.07852899

Association between depression and alcohol consumption variables over time

p17 <- ggplot(data=dt2, aes(BDITOT, DperWk)) +
    geom_point()+stat_smooth(method="lm") +
    facet_wrap(~VISIT)
p17
## Warning: Removed 1 rows containing non-finite values (stat_smooth).
## Warning: Removed 1 rows containing missing values (geom_point).

p18 <- ggplot(data=dt2, aes(BDITOT, DperDday)) +
    geom_point()+stat_smooth(method="lm") +
    facet_wrap(~VISIT)
p18
## Warning: Removed 1 rows containing non-finite values (stat_smooth).

## Warning: Removed 1 rows containing missing values (geom_point).

p19 <- ggplot(data=dt2, aes(BDITOT, DayPerWk)) +
    geom_point()+stat_smooth(method="lm") +
    facet_wrap(~VISIT)
p19
## Warning: Removed 1 rows containing non-finite values (stat_smooth).

## Warning: Removed 1 rows containing missing values (geom_point).

p20 <- ggplot(data=dt2, aes(BDITOT, HvyPerWk)) +
    geom_point()+stat_smooth(method="lm") +
    facet_wrap(~VISIT)
p20
## Warning: Removed 1 rows containing non-finite values (stat_smooth).

## Warning: Removed 1 rows containing missing values (geom_point).

cor(dt2[, 11], dt2[,13:16], use = "pairwise.complete.obs")
##        DperWk  DperDday  DayPerWk  HvyPerWk
## [1,] 0.270607 0.1717194 0.2049559 0.2480566