Overview

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

CFQ Total

#HISTOGRAMS FOR COUNTS

ggplot(centre, aes(cfq_total)) +
  geom_histogram(binwidth = 10) +
  theme_classic() +
  facet_wrap(~ visit)

#BOXPLOTS FOR MEANS PER VISIT

ggplot(centre, aes(visit, cfq_total)) +
  geom_boxplot() +
  theme_classic()

#MEANS PER VISIT

centre %>%
  group_by(visit) %>%
  filter(!is.na(cfq_total)) %>%
  summarize(mean(cfq_total))
## # A tibble: 4 × 2
##   visit     `mean(cfq_total)`
##   <chr>                 <dbl>
## 1 follow-up              49.0
## 2 post                   48.7
## 3 pre                    54.3
## 4 <NA>                   46.5
#ONE WAY ANOVA

cfq.total.anova <- aov(
  cfq_total ~ visit, data = centre
)
summary(cfq.total.anova)
##              Df Sum Sq Mean Sq F value  Pr(>F)   
## visit         2   3760  1880.1   6.229 0.00213 **
## Residuals   507 153032   301.8                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 12 observations deleted due to missingness
#POST-HOC TESTS

TukeyHSD(cfq.total.anova)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = cfq_total ~ visit, data = centre)
## 
## $visit
##                      diff        lwr      upr     p adj
## post-follow-up -0.2759263 -5.0613692 4.509517 0.9899239
## pre-follow-up   5.3412036  0.8148146 9.867593 0.0158235
## pre-post        5.6171299  1.3831659 9.851094 0.0054461

CFQ Forget

#HISTOGRAMS FOR COUNTS

ggplot(centre, aes(cfq_forget)) +
  geom_histogram(binwidth = 5) +
  theme_classic() +
  facet_wrap(~ visit)

#BOXPLOTS FOR MEANS PER VISIT

ggplot(centre, aes(visit, cfq_forget)) +
  geom_boxplot() +
  theme_classic()

#MEANS PER VISIT

centre %>%
  group_by(visit) %>%
  filter(!is.na(cfq_forget)) %>%
  summarize(mean(cfq_forget))
## # A tibble: 4 × 2
##   visit     `mean(cfq_forget)`
##   <chr>                  <dbl>
## 1 follow-up               17.8
## 2 post                    17.4
## 3 pre                     19.8
## 4 <NA>                    17.6
#ONE WAY ANOVA

cfq.forget.anova <- aov(
  cfq_forget ~ visit, data = centre
)
summary(cfq.forget.anova)
##              Df Sum Sq Mean Sq F value   Pr(>F)    
## visit         2    656   328.1   9.303 0.000108 ***
## Residuals   507  17881    35.3                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 12 observations deleted due to missingness
#POST-HOC TESTS

TukeyHSD(cfq.forget.anova)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = cfq_forget ~ visit, data = centre)
## 
## $visit
##                      diff        lwr      upr     p adj
## post-follow-up -0.3654813 -2.0012770 1.270314 0.8590427
## pre-follow-up   2.0768329  0.5295890 3.624077 0.0048298
## pre-post        2.4423142  0.9950292 3.889599 0.0002456

CFQ Distract

#HISTOGRAMS FOR COUNTS

ggplot(centre, aes(cfq_distract)) +
  geom_histogram(binwidth = 5) +
  theme_classic() +
  facet_wrap(~ visit)

#BOXPLOTS FOR MEANS PER VISIT

ggplot(centre, aes(visit, cfq_distract)) +
  geom_boxplot() +
  theme_classic()

#MEANS PER VISIT

centre %>%
  group_by(visit) %>%
  filter(!is.na(cfq_distract)) %>%
  summarize(mean(cfq_distract))
## # A tibble: 4 × 2
##   visit     `mean(cfq_distract)`
##   <chr>                    <dbl>
## 1 follow-up                 16.3
## 2 post                      16.5
## 3 pre                       18.2
## 4 <NA>                      15.6
#ONE WAY ANOVA

cfq.distract.anova <- aov(
  cfq_distract ~ visit, data = centre
)
summary(cfq.distract.anova)
##              Df Sum Sq Mean Sq F value  Pr(>F)   
## visit         2    381  190.30   5.431 0.00464 **
## Residuals   507  17766   35.04                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 12 observations deleted due to missingness
#POST-HOC TESTS

TukeyHSD(cfq.distract.anova)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = cfq_distract ~ visit, data = centre)
## 
## $visit
##                     diff        lwr      upr     p adj
## post-follow-up 0.2327779 -1.3977505 1.863306 0.9398222
## pre-follow-up  1.8697319  0.3274701 3.411994 0.0126332
## pre-post       1.6369541  0.1943293 3.079579 0.0214926

CFQ False

#HISTOGRAMS FOR COUNTS

ggplot(centre, aes(cfq_false)) +
  geom_histogram(binwidth = 5) +
  theme_classic() +
  facet_wrap(~ visit)

#BOXPLOTS FOR MEANS PER VISIT

ggplot(centre, aes(visit, cfq_false)) +
  geom_boxplot() +
  theme_classic()

#MEANS PER VISIT

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

cfq.false.anova <- aov(
  cfq_false ~ visit, data = centre
)
summary(cfq.false.anova)
##              Df Sum Sq Mean Sq F value Pr(>F)  
## visit         2    232  115.99   3.067 0.0474 *
## Residuals   507  19174   37.82                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 12 observations deleted due to missingness
#POST-HOC TESTS

TukeyHSD(cfq.false.anova)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = cfq_false ~ visit, data = centre)
## 
## $visit
##                      diff         lwr      upr     p adj
## post-follow-up -0.1521597 -1.84607123 1.541752 0.9757225
## pre-follow-up   1.2762294 -0.32598436 2.878443 0.1477913
## pre-post        1.4283891 -0.07031441 2.927093 0.0655344