Overview

Histograms, means, and one-way ANOVAs for the CFQ (Total, Forgetfulness, Distractability, False Triggering)

CFQ Total

#HISTOGRAMS FOR COUNTS

ggplot(cc, aes(cfq_total)) +
  geom_histogram(binwidth = 10) +
  theme_light() +
  facet_wrap(~ visit)

#BOXPLOTS FOR MEANS PER VISIT

ggplot(cc, aes(visit, cfq_total)) +
  geom_boxplot() +
  theme_light()

#MEANS PER VISIT

cc %>%
  group_by(visit) %>%
  filter(!is.na(cfq_total)) %>%
  summarize(mean(cfq_total))
## # A tibble: 3 × 2
##   visit     `mean(cfq_total)`
##   <chr>                 <dbl>
## 1 follow-up              49.5
## 2 post                   49.4
## 3 pre                    55.2
#ONE WAY ANOVA

cfq.total.anova <- aov(
  cfq_total ~ visit, data = cc
)
summary(cfq.total.anova)
##              Df Sum Sq Mean Sq F value  Pr(>F)   
## visit         2   3099  1549.7   5.808 0.00328 **
## Residuals   378 100856   266.8                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#POST-HOC TESTS

TukeyHSD(cfq.total.anova)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = cfq_total ~ visit, data = cc)
## 
## $visit
##                      diff        lwr       upr     p adj
## post-follow-up -0.1278862 -5.3030393  5.047267 0.9981377
## pre-follow-up   5.7178481  0.8064557 10.629241 0.0176787
## pre-post        5.8457343  1.2241020 10.467367 0.0087040

CFQ Forget

#HISTOGRAMS FOR COUNTS

ggplot(cc, aes(cfq_forget)) +
  geom_histogram(binwidth = 5) +
  theme_light() +
  facet_wrap(~ visit)

#BOXPLOTS FOR MEANS PER VISIT

ggplot(cc, aes(visit, cfq_forget)) +
  geom_boxplot() +
  theme_light()

#MEANS PER VISIT

cc %>%
  group_by(visit) %>%
  filter(!is.na(cfq_forget)) %>%
  summarize(mean(cfq_forget))
## # A tibble: 3 × 2
##   visit     `mean(cfq_forget)`
##   <chr>                  <dbl>
## 1 follow-up               18.0
## 2 post                    17.6
## 3 pre                     20.3
#ONE WAY ANOVA

cfq.forget.anova <- aov(
  cfq_forget ~ visit, data = cc
)
summary(cfq.forget.anova)
##              Df Sum Sq Mean Sq F value   Pr(>F)    
## visit         2    603  301.30   9.802 7.08e-05 ***
## Residuals   378  11619   30.74                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#POST-HOC TESTS

TukeyHSD(cfq.forget.anova)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = cfq_forget ~ visit, data = cc)
## 
## $visit
##                      diff        lwr      upr     p adj
## post-follow-up -0.3565041 -2.1130426 1.400034 0.8819374
## pre-follow-up   2.3411392  0.6741257 4.008153 0.0029876
## pre-post        2.6976433  1.1289795 4.266307 0.0001861

CFQ Distract

#HISTOGRAMS FOR COUNTS

ggplot(cc, aes(cfq_distract)) +
  geom_histogram(binwidth = 5) +
  theme_light() +
  facet_wrap(~ visit)

#BOXPLOTS FOR MEANS PER VISIT

ggplot(cc, aes(visit, cfq_distract)) +
  geom_boxplot() +
  theme_light()

#MEANS PER VISIT

cc %>%
  group_by(visit) %>%
  filter(!is.na(cfq_distract)) %>%
  summarize(mean(cfq_distract))
## # A tibble: 3 × 2
##   visit     `mean(cfq_distract)`
##   <chr>                    <dbl>
## 1 follow-up                 16.5
## 2 post                      16.8
## 3 pre                       18.3
#ONE WAY ANOVA

cfq.distract.anova <- aov(
  cfq_distract ~ visit, data = cc
)
summary(cfq.distract.anova)
##              Df Sum Sq Mean Sq F value Pr(>F)  
## visit         2    248   123.8   3.894 0.0212 *
## Residuals   378  12020    31.8                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#POST-HOC TESTS

TukeyHSD(cfq.distract.anova)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = cfq_distract ~ visit, data = cc)
## 
## $visit
##                     diff         lwr      upr     p adj
## post-follow-up 0.2623577 -1.52425939 2.048975 0.9363236
## pre-follow-up  1.7684810  0.07292194 3.464040 0.0386226
## pre-post       1.5061233 -0.08940194 3.101649 0.0689344

CFQ False

#HISTOGRAMS FOR COUNTS

ggplot(cc, aes(cfq_false)) +
  geom_histogram(binwidth = 5) +
  theme_light() +
  facet_wrap(~ visit)

#BOXPLOTS FOR MEANS PER VISIT

ggplot(cc, aes(visit, cfq_false)) +
  geom_boxplot() +
  theme_light()

#MEANS PER VISIT

cc %>%
  group_by(visit) %>%
  filter(!is.na(cfq_false)) %>%
  summarize(mean(cfq_false))
## # A tibble: 3 × 2
##   visit     `mean(cfq_false)`
##   <chr>                 <dbl>
## 1 follow-up              12.9
## 2 post                   12.9
## 3 pre                    14.4
#ONE WAY ANOVA

cfq.false.anova <- aov(
  cfq_false ~ visit, data = cc
)
summary(cfq.false.anova)
##              Df Sum Sq Mean Sq F value Pr(>F)  
## visit         2    231  115.35   3.329 0.0369 *
## Residuals   378  13098   34.65                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#POST-HOC TESTS

TukeyHSD(cfq.false.anova)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = cfq_false ~ visit, data = cc)
## 
## $visit
##                       diff         lwr      upr     p adj
## post-follow-up -0.01821138 -1.88321748 1.846795 0.9997090
## pre-follow-up   1.56936709 -0.20058573 3.339320 0.0940206
## pre-post        1.58757847 -0.07795146 3.253108 0.0654607