library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.1
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(janitor)
##
## Attaching package: 'janitor'
##
## The following objects are masked from 'package:stats':
##
## chisq.test, fisher.test
library(haven)
library(naniar)
library(ggpubr)
library(report)
library(ggplot2)
library(reshape2)
##
## Attaching package: 'reshape2'
##
## The following object is masked from 'package:tidyr':
##
## smiths
library(lme4)
## Loading required package: Matrix
##
## Attaching package: 'Matrix'
##
## The following objects are masked from 'package:tidyr':
##
## expand, pack, unpack
library(sjPlot)
library(parameters)
library(mediation)
## Loading required package: MASS
##
## Attaching package: 'MASS'
##
## The following object is masked from 'package:dplyr':
##
## select
##
## Loading required package: mvtnorm
## Loading required package: sandwich
## mediation: Causal Mediation Analysis
## Version: 4.5.0
library(lavaan)
## This is lavaan 0.6-19
## lavaan is FREE software! Please report any bugs.
library(lmerTest)
##
## Attaching package: 'lmerTest'
##
## The following object is masked from 'package:lme4':
##
## lmer
##
## The following object is masked from 'package:stats':
##
## step
library(effectsize)
##
## Attaching package: 'effectsize'
##
## The following object is masked from 'package:mvtnorm':
##
## standardize
library(emmeans)
## Welcome to emmeans.
## Caution: You lose important information if you filter this package's results.
## See '? untidy'
library(performance)
library(tinytex)
library(jtools)
##
## Attaching package: 'jtools'
##
## The following object is masked from 'package:effectsize':
##
## standardize
##
## The following object is masked from 'package:mvtnorm':
##
## standardize
library(interactions)
library(psych)
##
## Attaching package: 'psych'
##
## The following object is masked from 'package:effectsize':
##
## phi
##
## The following object is masked from 'package:lavaan':
##
## cor2cov
##
## The following object is masked from 'package:mediation':
##
## mediate
##
## The following objects are masked from 'package:ggplot2':
##
## %+%, alpha
library(ggdist)
library(gghalves)
library(ggpp)
## Registered S3 methods overwritten by 'ggpp':
## method from
## heightDetails.titleGrob ggplot2
## widthDetails.titleGrob ggplot2
##
## Attaching package: 'ggpp'
##
## The following objects are masked from 'package:ggpubr':
##
## as_npc, as_npcx, as_npcy
##
## The following object is masked from 'package:ggplot2':
##
## annotate
library(interactions)
library(ggpmisc)
library(ggExtra)
library(codetools)
Full_data <- read_csv("Full_data_n.csv") %>%
dplyr::select(-"...1")
## New names:
## Rows: 259 Columns: 271
## ── Column specification
## ──────────────────────────────────────────────────────── Delimiter: "," chr
## (1): Group dbl (270): ...1, ID, PRE_IUS_1, PRE_IUS_2, PRE_IUS_3, PRE_IUS_4,
## PRE_IUS_5, ...
## ℹ Use `spec()` to retrieve the full column specification for this data. ℹ
## Specify the column types or set `show_col_types = FALSE` to quiet this message.
## • `` -> `...1`
Demographics <- read_csv("Demographics.csv")
## New names:
## Rows: 259 Columns: 11
## ── Column specification
## ──────────────────────────────────────────────────────── Delimiter: "," chr
## (8): Group, Gender_value, Ethnicity_value, Country_residence, Ppt_educat... dbl
## (3): ...1, ID, Age
## ℹ Use `spec()` to retrieve the full column specification for this data. ℹ
## Specify the column types or set `show_col_types = FALSE` to quiet this message.
## • `` -> `...1`
Acceptability <- read_csv("Acceptability.csv")
## New names:
## Rows: 209 Columns: 8
## ── Column specification
## ──────────────────────────────────────────────────────── Delimiter: "," chr
## (1): Group dbl (7): ...1, ...2, ID, B_acceptability_understandable,
## B_acceptability_use...
## ℹ Use `spec()` to retrieve the full column specification for this data. ℹ
## Specify the column types or set `show_col_types = FALSE` to quiet this message.
## • `` -> `...1`
## • `...1` -> `...2`
Total sample, mindset training, psychoeducation, no-training Difference between groups ### Total Sample
Age_meanT <- Demographics %>%
filter(Age != "NA") %>%
dplyr::summarise(mean = mean(Age),
sd = sd(Age),
min = min(Age),
max = max(Age))
Age_meanT
## # A tibble: 1 × 4
## mean sd min max
## <dbl> <dbl> <dbl> <dbl>
## 1 22.2 1.35 18 24
age_anova <- aov(Age ~ Group, data=Demographics)
summary(age_anova)
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 4.6 2.289 1.26 0.286
## Residuals 239 434.2 1.817
## 17 observations deleted due to missingness
Note: - Mindset Training = Intervention - Psychoeducation = Controls - No-Training = ECs
Age_meanG <- Demographics %>%
filter(Age != "NA") %>%
group_by(Group) %>%
dplyr::summarise(mean = mean(Age),
sd = sd(Age),
min = min(Age),
max = max(Age)) %>%
ungroup()
Age_meanG
## # A tibble: 3 × 5
## Group mean sd min max
## <chr> <dbl> <dbl> <dbl> <dbl>
## 1 Controls 22.3 1.27 19 24
## 2 ECs 22.3 1.43 18 24
## 3 Intervention 22.0 1.39 18 24
Gender_count <- Demographics %>%
count(Gender_value)
Gender_count
## # A tibble: 4 × 2
## Gender_value n
## <chr> <int>
## 1 Female 171
## 2 Male 86
## 3 Prefer not to say 1
## 4 __other 1
Gender_chi <- Demographics %>%
filter(Gender_value != "Prefer not to say") %>%
filter(Gender_value != "__other")
chisq.test(Gender_chi$Group, Gender_chi$Gender_value)
##
## Pearson's Chi-squared test
##
## data: Gender_chi$Group and Gender_chi$Gender_value
## X-squared = 0.24926, df = 2, p-value = 0.8828
Gender_countG <- Demographics %>%
group_by(Group) %>%
count(Gender_value) %>%
ungroup()
Gender_countG
## # A tibble: 8 × 3
## Group Gender_value n
## <chr> <chr> <int>
## 1 Controls Female 69
## 2 Controls Male 37
## 3 ECs Female 33
## 4 ECs Male 17
## 5 Intervention Female 69
## 6 Intervention Male 32
## 7 Intervention Prefer not to say 1
## 8 Intervention __other 1
Ethnicity_count <- Demographics %>%
count(Ethnicity_value)
Ethnicity_count
## # A tibble: 6 × 2
## Ethnicity_value n
## <chr> <int>
## 1 Aboriginal or Torres Strait Islander 1
## 2 Asian 13
## 3 Black 209
## 4 Mixed 7
## 5 Prefer not to say 3
## 6 White 26
Ethnicity_chi <- Demographics %>%
filter(Ethnicity_value != "Prefer not to say") %>%
filter(Ethnicity_value != "Aboriginal or Torres Strait Islander")
chisq.test(Ethnicity_chi$Group, Ethnicity_chi$Ethnicity_value)
## Warning in stats::chisq.test(x, y, ...): Chi-squared approximation may be
## incorrect
##
## Pearson's Chi-squared test
##
## data: Ethnicity_chi$Group and Ethnicity_chi$Ethnicity_value
## X-squared = 2.5676, df = 6, p-value = 0.8608
Ethnicity_countG <- Demographics %>%
group_by(Group) %>%
count(Ethnicity_value) %>%
ungroup()
Ethnicity_countG
## # A tibble: 15 × 3
## Group Ethnicity_value n
## <chr> <chr> <int>
## 1 Controls Asian 3
## 2 Controls Black 87
## 3 Controls Mixed 3
## 4 Controls Prefer not to say 1
## 5 Controls White 12
## 6 ECs Asian 4
## 7 ECs Black 41
## 8 ECs Mixed 1
## 9 ECs White 4
## 10 Intervention Aboriginal or Torres Strait Islander 1
## 11 Intervention Asian 6
## 12 Intervention Black 81
## 13 Intervention Mixed 3
## 14 Intervention Prefer not to say 2
## 15 Intervention White 10
Education_count <- Demographics %>%
count(Ppt_education_value)
Education_count
## # A tibble: 5 × 2
## Ppt_education_value n
## <chr> <int>
## 1 High School 88
## 2 Prefer not to say 2
## 3 Primary School 1
## 4 Professional/Vocational Training 18
## 5 University 150
Education_chi <- Demographics %>%
filter(Ppt_education_value != "Prefer not to say") %>%
filter(Ppt_education_value != "Primary School")
chisq.test(Education_chi$Group, Education_chi$Ppt_education_value)
## Warning in stats::chisq.test(x, y, ...): Chi-squared approximation may be
## incorrect
##
## Pearson's Chi-squared test
##
## data: Education_chi$Group and Education_chi$Ppt_education_value
## X-squared = 4.6114, df = 4, p-value = 0.3295
Education_countG <- Demographics %>%
group_by(Group) %>%
count(Ppt_education_value) %>%
ungroup()
Education_countG
## # A tibble: 11 × 3
## Group Ppt_education_value n
## <chr> <chr> <int>
## 1 Controls High School 44
## 2 Controls Professional/Vocational Training 8
## 3 Controls University 54
## 4 ECs High School 15
## 5 ECs Professional/Vocational Training 3
## 6 ECs University 32
## 7 Intervention High School 29
## 8 Intervention Prefer not to say 2
## 9 Intervention Primary School 1
## 10 Intervention Professional/Vocational Training 7
## 11 Intervention University 64
MH_count <- Demographics %>%
count(MH_value)
MH_count
## # A tibble: 3 × 2
## MH_value n
## <chr> <int>
## 1 No 226
## 2 Prefer not to say 5
## 3 Yes 28
MH_chi <- Demographics %>%
filter(MH_value != "Prefer not to say")
chisq.test(MH_chi$Group, MH_chi$MH_value)
##
## Pearson's Chi-squared test
##
## data: MH_chi$Group and MH_chi$MH_value
## X-squared = 1.6109, df = 2, p-value = 0.4469
MH_countG <- Demographics %>%
group_by(Group) %>%
count(MH_value) %>%
ungroup()
MH_countG
## # A tibble: 8 × 3
## Group MH_value n
## <chr> <chr> <int>
## 1 Controls No 90
## 2 Controls Prefer not to say 2
## 3 Controls Yes 14
## 4 ECs No 44
## 5 ECs Yes 6
## 6 Intervention No 92
## 7 Intervention Prefer not to say 3
## 8 Intervention Yes 8
PRE_IUS_GAD_lm <- lm(A_PRE_IUS_total ~ A_PRE_GAD_total, data = Full_data)
summary(PRE_IUS_GAD_lm)
##
## Call:
## lm(formula = A_PRE_IUS_total ~ A_PRE_GAD_total, data = Full_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.3228 -4.8228 0.7116 4.1772 20.6429
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 35.04669 0.88936 39.41 <2e-16 ***
## A_PRE_GAD_total 0.82761 0.08639 9.58 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 7.621 on 257 degrees of freedom
## Multiple R-squared: 0.2631, Adjusted R-squared: 0.2603
## F-statistic: 91.78 on 1 and 257 DF, p-value: < 2.2e-16
# BF
full_lm = lm(A_PRE_IUS_total ~ A_PRE_GAD_total, Full_data)
null_lm = lm(A_PRE_IUS_total ~ -A_PRE_GAD_total, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 9.278545e+15
PRE_IUS_PHQ_lm <- lm(A_PRE_IUS_total ~ A_PRE_PHQ_total, data = Full_data)
summary(PRE_IUS_PHQ_lm)
##
## Call:
## lm(formula = A_PRE_IUS_total ~ A_PRE_PHQ_total, data = Full_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.9576 -4.5129 0.0901 4.9155 22.1617
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 35.4890 0.9776 36.303 < 2e-16 ***
## A_PRE_PHQ_total 0.6746 0.0841 8.021 3.72e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 7.94 on 257 degrees of freedom
## Multiple R-squared: 0.2002, Adjusted R-squared: 0.1971
## F-statistic: 64.34 on 1 and 257 DF, p-value: 3.716e-14
# BF
full_lm = lm(A_PRE_IUS_total ~ A_PRE_PHQ_total, Full_data)
null_lm = lm(A_PRE_IUS_total ~ -A_PRE_PHQ_total, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 2.28886e+11
PRE_IUS_negaff_lm <- lm(A_PRE_IUS_total ~ A_PRE_negaff, data = Full_data)
summary(PRE_IUS_negaff_lm)
##
## Call:
## lm(formula = A_PRE_IUS_total ~ A_PRE_negaff, data = Full_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.2840 -6.0303 0.1752 6.0332 20.9727
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 44.57405 0.67547 65.989 < 2e-16 ***
## A_PRE_negaff 0.06646 0.01228 5.412 1.43e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 8.412 on 257 degrees of freedom
## Multiple R-squared: 0.1023, Adjusted R-squared: 0.0988
## F-statistic: 29.29 on 1 and 257 DF, p-value: 1.431e-07
# BF
full_lm = lm(A_PRE_IUS_total ~ A_PRE_negaff, Full_data)
null_lm = lm(A_PRE_IUS_total ~ -A_PRE_negaff, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 72858.96
PRE_IUS_FI_lm <- lm(A_PRE_IUS_total ~ A_PRE_FI_total, data = Full_data)
summary(PRE_IUS_FI_lm)
##
## Call:
## lm(formula = A_PRE_IUS_total ~ A_PRE_FI_total, data = Full_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.1561 -4.1561 0.3806 5.0026 15.3806
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 29.1074 1.2521 23.25 <2e-16 ***
## A_PRE_FI_total 1.2927 0.1148 11.26 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 7.265 on 257 degrees of freedom
## Multiple R-squared: 0.3304, Adjusted R-squared: 0.3278
## F-statistic: 126.8 on 1 and 257 DF, p-value: < 2.2e-16
# BF
full_lm = lm(A_PRE_IUS_total ~ A_PRE_FI_total, Full_data)
null_lm = lm(A_PRE_IUS_total ~ -A_PRE_FI_total, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 2.228468e+21
Plot_ius_gad <- ggplot(data = Full_data, aes(x = A_PRE_IUS_total, y = A_PRE_GAD_total)) +
geom_point(alpha = 0.5, color = "seagreen3") +
geom_smooth(method = "lm", color = "black", fill = "seagreen4") +
scale_x_continuous(name = "Baseline Intolerance of Uncertainty") +
scale_y_continuous(name = "Baseline Anxiety Symptoms",
limits = c(0, 21),
breaks = seq(0, 21, by = 3)) +
coord_cartesian(xlim = c(12, 60)) +
theme(text = element_text(size = 20), axis.text = element_text(size = 20), axis.title.x = element_text(size = 20), axis.title.y = element_text(size = 20)) +
theme_classic()
print(Plot_ius_gad)
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 4 rows containing missing values or values outside the scale range
## (`geom_smooth()`).
Plot_ius_phq <- ggplot(data = Full_data, aes(x = A_PRE_IUS_total, y = A_PRE_PHQ_total)) +
geom_point(alpha = 0.5, color = "deepskyblue2") +
geom_smooth(method = "lm", color = "black", fill = "deepskyblue4") +
scale_x_continuous(name = "Baseline Intolerance of Uncertainty") +
scale_y_continuous(name = "Baseline Depression Symptoms",
limits = c(0, 24),
breaks = seq(0, 24, by = 4)) +
coord_cartesian(xlim = c(12, 60)) +
theme(text = element_text(size = 20), axis.text = element_text(size = 20), axis.title.x = element_text(size = 20), axis.title.y = element_text(size = 20)) +
theme_classic()
print(Plot_ius_phq)
## `geom_smooth()` using formula = 'y ~ x'
Plot_ius_negaff <- ggplot(data = Full_data, aes(x = A_PRE_IUS_total, y = A_PRE_negaff)) +
geom_point(alpha = 0.5, color = "orange") +
geom_smooth(method = "lm", color = "black", fill = "orange3") +
scale_x_continuous(name = "Baseline Intolerance of Uncertainty") +
scale_y_continuous(name = "Baseline Negative Affect") +
coord_cartesian(xlim = c(12, 60)) +
theme(text = element_text(size = 20), axis.text = element_text(size = 20), axis.title.x = element_text(size = 20), axis.title.y = element_text(size = 20)) +
theme_classic()
print(Plot_ius_negaff)
## `geom_smooth()` using formula = 'y ~ x'
Plot_ius_fi <- ggplot(data = Full_data, aes(x = A_PRE_IUS_total, y = A_PRE_FI_total)) +
geom_point(alpha = 0.5, color = "orchid") +
geom_smooth(method = "lm", color = "black", fill = "orchid4") +
scale_x_continuous(name = "Baseline Intolerance of Uncertainty") +
scale_y_continuous(name = "Baseline Functional Impairment") +
coord_cartesian(xlim = c(12, 60), ylim = c(0, 20)) +
theme(text = element_text(size = 20), axis.text = element_text(size = 20), axis.title.x = element_text(size = 20), axis.title.y = element_text(size = 20)) +
theme_classic()
print(Plot_ius_fi)
## `geom_smooth()` using formula = 'y ~ x'
## Anxiety
cor.test(Full_data$A_PRE_IUS_total, Full_data$A_PRE_GAD_total, method=c("pearson"))
##
## Pearson's product-moment correlation
##
## data: Full_data$A_PRE_IUS_total and Full_data$A_PRE_GAD_total
## t = 9.5802, df = 257, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.4171735 0.5975068
## sample estimates:
## cor
## 0.5129779
## Depression
cor.test(Full_data$A_PRE_IUS_total, Full_data$A_PRE_PHQ_total, method=c("pearson"))
##
## Pearson's product-moment correlation
##
## data: Full_data$A_PRE_IUS_total and Full_data$A_PRE_PHQ_total
## t = 8.0215, df = 257, p-value = 3.716e-14
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.3443686 0.5399152
## sample estimates:
## cor
## 0.4474747
## Negative Affect
cor.test(Full_data$A_PRE_IUS_total, Full_data$A_PRE_negaff, method=c("pearson"))
##
## Pearson's product-moment correlation
##
## data: Full_data$A_PRE_IUS_total and Full_data$A_PRE_negaff
## t = 5.4116, df = 257, p-value = 1.431e-07
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.2059755 0.4251490
## sample estimates:
## cor
## 0.3198344
## Functional Impairment
cor.test(Full_data$A_PRE_IUS_total, Full_data$A_PRE_FI_total, method=c("pearson"))
##
## Pearson's product-moment correlation
##
## data: Full_data$A_PRE_IUS_total and Full_data$A_PRE_FI_total
## t = 11.26, df = 257, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.4870121 0.6510571
## sample estimates:
## cor
## 0.5747811
ggsave(plot=Plot_ius_phq, 'IUS_PHQ.png',
width=7, height=4,
dpi=500)
## `geom_smooth()` using formula = 'y ~ x'
ggsave(plot=Plot_ius_gad, 'IUS_GAD.png',
width=7, height=4,
dpi=500)
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 4 rows containing missing values or values outside the scale range
## (`geom_smooth()`).
ggsave(plot=Plot_ius_negaff, 'IUS_negaff.png',
width=7, height=4,
dpi=500)
## `geom_smooth()` using formula = 'y ~ x'
ggsave(plot=Plot_ius_fi, 'IUS_FI.png',
width=7, height=4,
dpi=500)
## `geom_smooth()` using formula = 'y ~ x'
IUS_alltimepoints <- Full_data %>%
dplyr::select("A_PRE_IUS_total", "B_POST_IUS_total", "C_W1_IUS_total", "D_M1_IUS_total", "E_M3_IUS_total", "Group") %>%
pivot_longer(cols = c(A_PRE_IUS_total, B_POST_IUS_total, C_W1_IUS_total, D_M1_IUS_total, E_M3_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
a <- IUS_alltimepoints %>%
mutate(Time=case_when(
Time == "A_PRE_IUS_total" ~ "Baseline",
Time == "B_POST_IUS_total" ~ "Post",
Time == "C_W1_IUS_total" ~ "1 Week",
Time == "D_M1_IUS_total" ~ "1 Month",
Time == "E_M3_IUS_total" ~ "3 Months"
)) %>%
mutate(Time=factor(Time, levels=c("Baseline", "Post", "1 Week", "1 Month", "3 Months"))) %>%
mutate(Group=case_when(
Group == "A_ECs" ~ "\nNo-Training\nControl",
Group == "B_Controls" ~ "\nPsychoeducation\nControl",
Group == "C_Intervention" ~ "\nUncertainty-Mindsets\nTraining")) %>%
mutate(Group=factor(Group, levels=c("\nNo-Training\nControl", "\nPsychoeducation\nControl", "\nUncertainty-Mindsets\nTraining"))) %>%
ggplot(aes(x = Time, y = IUS_Score, color = Group, fill = Group, group = Group)) +
stat_summary(fun = mean, geom = "point") + # Add points at the mean values
scale_y_continuous(name = "Intolerance of Uncertainty") +
theme_bw() +
theme(legend.position = "none") +
geom_smooth(se = TRUE, level = 0.95, alpha = 0.25)
IUS_gg <- ggMarginal(a,groupColour = TRUE, groupFill = TRUE, type = "density")
## Warning: Removed 79 rows containing non-finite outside the scale range
## (`stat_summary()`).
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning: Removed 79 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Removed 79 rows containing non-finite outside the scale range
## (`stat_summary()`).
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning: Removed 79 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x < range[1], value =
## "Baseline"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x > range[2], value =
## "Post"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x < range[1], value =
## "Baseline"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x > range[2], value =
## "Post"): NAs introduced by coercion
## Warning: Removed 15 rows containing non-finite outside the scale range
## (`stat_density()`).
## Removed 15 rows containing non-finite outside the scale range
## (`stat_density()`).
## Warning: No shared levels found between `names(values)` of the manual scale and the
## data's colour values.
## Warning: No shared levels found between `names(values)` of the manual scale and the
## data's fill values.
IUS_gg
IUS_BP <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "B_POST_IUS_total")
IUS_BP_long <- IUS_BP %>%
pivot_longer(cols = c(A_PRE_IUS_total, B_POST_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_BP <- lmer(IUS_Score ~ Group * Time + (1|ID), data = IUS_BP_long, REML = TRUE)
summary(IUS_MEM_BP)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Group * Time + (1 | ID)
## Data: IUS_BP_long
##
## REML criterion at convergence: 3592.2
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.95161 -0.44757 0.00781 0.41532 2.86841
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 71.13 8.434
## Residual 24.28 4.927
## Number of obs: 516, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 41.0800 1.3814 328.7093 29.738
## GroupB_Controls 0.9483 1.6758 328.7093 0.566
## GroupC_Intervention 1.9880 1.6836 328.7093 1.181
## TimeB_POST_IUS_total -0.2800 0.9854 254.2485 -0.284
## GroupB_Controls:TimeB_POST_IUS_total -3.5879 1.1955 254.2485 -3.001
## GroupC_Intervention:TimeB_POST_IUS_total -6.0437 1.2044 254.6121 -5.018
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## GroupB_Controls 0.57186
## GroupC_Intervention 0.23854
## TimeB_POST_IUS_total 0.77654
## GroupB_Controls:TimeB_POST_IUS_total 0.00296 **
## GroupC_Intervention:TimeB_POST_IUS_total 9.81e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TB_POS GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TB_POST_IUS -0.357 0.294 0.293
## GB_C:TB_POS 0.294 -0.357 -0.241 -0.824
## GC_I:TB_POS 0.292 -0.241 -0.356 -0.818 0.674
anova (IUS_MEM_BP)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 10.89 5.45 2 256.08 0.2243 0.7992
## Time 1394.73 1394.73 1 254.53 57.4503 6.459e-13 ***
## Group:Time 617.82 308.91 2 254.58 12.7243 5.407e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(IUS_MEM_BP)
## # R2 for Mixed Models
##
## Conditional R2: 0.760
## Marginal R2: 0.056
parameters::standardise_parameters(IUS_MEM_BP)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ------------------------------------------------------------------------------
## (Intercept) | 0.09 | [-0.18, 0.36]
## Group [B_Controls] | 0.09 | [-0.23, 0.42]
## Group [C_Intervention] | 0.20 | [-0.13, 0.53]
## Time [B_POST_IUS_total] | -0.03 | [-0.22, 0.17]
## Group [B_Controls] × Time [B_POST_IUS_total] | -0.36 | [-0.59, -0.12]
## Group [C_Intervention] × Time [B_POST_IUS_total] | -0.60 | [-0.84, -0.37]
# BF
full_lmer <- lmer(IUS_Score ~ Group + Time + (1|ID), data = IUS_BP_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.02741644
full_lmer <- lmer(IUS_Score ~ Group + Time + (1|ID), data = IUS_BP_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 2.401982e+14
full_lmer <- lmer(IUS_Score ~ Group * Time + (1|ID), data = IUS_BP_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 2612.411
IUS_B1W <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "C_W1_IUS_total")
IUS_B1W_long <- IUS_B1W %>%
pivot_longer(cols = c(A_PRE_IUS_total, C_W1_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_B1W <- lmer(IUS_Score ~ Group * Time + (1|ID), data = IUS_B1W_long, REML = TRUE)
summary(IUS_MEM_B1W)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Group * Time + (1 | ID)
## Data: IUS_B1W_long
##
## REML criterion at convergence: 3541.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.05745 -0.40449 -0.00329 0.45694 2.90920
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 64.04 8.003
## Residual 24.69 4.969
## Number of obs: 511, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 41.0800 1.3321 334.4251 30.837
## GroupB_Controls 0.9483 1.6161 334.4251 0.587
## GroupC_Intervention 1.9880 1.6236 334.4251 1.224
## TimeC_W1_IUS_total 0.8991 1.0114 251.5502 0.889
## GroupB_Controls:TimeC_W1_IUS_total -2.7707 1.2233 251.1429 -2.265
## GroupC_Intervention:TimeC_W1_IUS_total -5.4023 1.2307 251.3348 -4.390
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## GroupB_Controls 0.5577
## GroupC_Intervention 0.2217
## TimeC_W1_IUS_total 0.3749
## GroupB_Controls:TimeC_W1_IUS_total 0.0244 *
## GroupC_Intervention:TimeC_W1_IUS_total 1.67e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TC_W1_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmC_W1_IUS_ -0.366 0.302 0.301
## GB_C:TC_W1_ 0.303 -0.368 -0.249 -0.827
## GC_I:TC_W1_ 0.301 -0.248 -0.367 -0.822 0.679
anova (IUS_MEM_B1W)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 5.54 2.77 2 256.11 0.1122 0.8938692
## Time 372.30 372.30 1 251.08 15.0803 0.0001318 ***
## Group:Time 499.29 249.64 2 250.97 10.1120 5.976e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(IUS_MEM_B1W)
## # R2 for Mixed Models
##
## Conditional R2: 0.729
## Marginal R2: 0.027
parameters::standardise_parameters(IUS_MEM_B1W)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ----------------------------------------------------------------------------
## (Intercept) | -7.24e-03 | [-0.28, 0.27]
## Group [B_Controls] | 0.10 | [-0.23, 0.43]
## Group [C_Intervention] | 0.21 | [-0.13, 0.55]
## Time [C_W1_IUS_total] | 0.09 | [-0.11, 0.30]
## Group [B_Controls] × Time [C_W1_IUS_total] | -0.29 | [-0.55, -0.04]
## Group [C_Intervention] × Time [C_W1_IUS_total] | -0.57 | [-0.82, -0.31]
# BF
full_lmer <- lmer(IUS_Score ~ Group + Time + (1|ID), data = IUS_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.02231583
full_lmer <- lmer(IUS_Score ~ Group + Time + (1|ID), data = IUS_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 19872.83
full_lmer <- lmer(IUS_Score ~ Group * Time + (1|ID), data = IUS_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 241.0079
IUS_B1M <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "D_M1_IUS_total")
IUS_B1M_long <- IUS_B1M %>%
pivot_longer(cols = c(A_PRE_IUS_total, D_M1_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_B1M <- lmer(IUS_Score ~ Group * Time + (1|ID), data = IUS_B1M_long, REML = TRUE)
summary(IUS_MEM_B1M)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Group * Time + (1 | ID)
## Data: IUS_B1M_long
##
## REML criterion at convergence: 3427.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.95787 -0.46559 0.01777 0.50003 2.25579
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 59.99 7.745
## Residual 29.75 5.454
## Number of obs: 488, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 41.0800 1.3397 343.4368 30.664
## GroupB_Controls 0.9483 1.6252 343.4368 0.583
## GroupC_Intervention 1.9880 1.6328 343.4368 1.218
## TimeD_M1_IUS_total 2.2079 1.1512 235.9671 1.918
## GroupB_Controls:TimeD_M1_IUS_total -3.9626 1.3951 235.8181 -2.840
## GroupC_Intervention:TimeD_M1_IUS_total -6.9119 1.4023 235.8887 -4.929
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## GroupB_Controls 0.5599
## GroupC_Intervention 0.2242
## TimeD_M1_IUS_total 0.0563 .
## GroupB_Controls:TimeD_M1_IUS_total 0.0049 **
## GroupC_Intervention:TimeD_M1_IUS_total 1.56e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TD_M1_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmD_M1_IUS_ -0.386 0.318 0.317
## GB_C:TD_M1_ 0.318 -0.386 -0.261 -0.825
## GC_I:TD_M1_ 0.317 -0.261 -0.386 -0.821 0.677
anova (IUS_MEM_B1M)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 28.24 14.12 2 257.23 0.4747 0.622614
## Time 207.73 207.73 1 235.80 6.9828 0.008781 **
## Group:Time 736.40 368.20 2 235.76 12.3767 7.74e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(IUS_MEM_B1M)
## # R2 for Mixed Models
##
## Conditional R2: 0.679
## Marginal R2: 0.032
parameters::standardise_parameters(IUS_MEM_B1M)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ----------------------------------------------------------------------------
## (Intercept) | -0.02 | [-0.30, 0.25]
## Group [B_Controls] | 0.10 | [-0.23, 0.43]
## Group [C_Intervention] | 0.21 | [-0.13, 0.54]
## Time [D_M1_IUS_total] | 0.23 | [-0.01, 0.47]
## Group [B_Controls] × Time [D_M1_IUS_total] | -0.41 | [-0.70, -0.13]
## Group [C_Intervention] × Time [D_M1_IUS_total] | -0.72 | [-1.01, -0.43]
# BF
full_lmer <- lmer(IUS_Score ~ Group + Time + (1|ID), data = IUS_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.02837185
full_lmer <- lmer(IUS_Score ~ Group + Time + (1|ID), data = IUS_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 197.3966
full_lmer <- lmer(IUS_Score ~ Group * Time + (1|ID), data = IUS_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 2671.184
IUS_B3m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "E_M3_IUS_total")
IUS_B3m_long <- IUS_B3m %>%
pivot_longer(cols = c(A_PRE_IUS_total, E_M3_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_B3m <- lmer(IUS_Score ~ Group * Time + (1|ID), data = IUS_B3m_long, REML = TRUE)
summary(IUS_MEM_B3m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Group * Time + (1 | ID)
## Data: IUS_B3m_long
##
## REML criterion at convergence: 3368.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.13135 -0.46676 -0.01065 0.50470 2.60255
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 54.14 7.358
## Residual 33.02 5.746
## Number of obs: 478, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 41.0800 1.3203 353.4444 31.114
## GroupB_Controls 0.9483 1.6017 353.4444 0.592
## GroupC_Intervention 1.9880 1.6091 353.4444 1.235
## TimeE_M3_IUS_total 0.6121 1.2603 234.2888 0.486
## GroupB_Controls:TimeE_M3_IUS_total -2.6651 1.5046 231.8564 -1.771
## GroupC_Intervention:TimeE_M3_IUS_total -4.0338 1.5345 234.1389 -2.629
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## GroupB_Controls 0.55419
## GroupC_Intervention 0.21750
## TimeE_M3_IUS_total 0.62764
## GroupB_Controls:TimeE_M3_IUS_total 0.07782 .
## GroupC_Intervention:TimeE_M3_IUS_total 0.00914 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TE_M3_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmE_M3_IUS_ -0.397 0.327 0.326
## GB_C:TE_M3_ 0.332 -0.403 -0.273 -0.838
## GC_I:TE_M3_ 0.326 -0.269 -0.397 -0.821 0.688
anova (IUS_MEM_B3m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 3.791 1.895 2 259.82 0.0574 0.944219
## Time 257.632 257.632 1 232.35 7.8031 0.005651 **
## Group:Time 228.245 114.123 2 231.83 3.4565 0.033174 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(IUS_MEM_B3m)
## # R2 for Mixed Models
##
## Conditional R2: 0.628
## Marginal R2: 0.018
parameters::standardise_parameters(IUS_MEM_B3m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ----------------------------------------------------------------------------
## (Intercept) | -0.03 | [-0.30, 0.25]
## Group [B_Controls] | 0.10 | [-0.23, 0.44]
## Group [C_Intervention] | 0.21 | [-0.13, 0.55]
## Time [E_M3_IUS_total] | 0.07 | [-0.20, 0.33]
## Group [B_Controls] × Time [E_M3_IUS_total] | -0.28 | [-0.60, 0.03]
## Group [C_Intervention] × Time [E_M3_IUS_total] | -0.43 | [-0.75, -0.11]
# BF
full_lmer <- lmer(IUS_Score ~ Group + Time + (1|ID), data = IUS_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.02249636
full_lmer <- lmer(IUS_Score ~ Group + Time + (1|ID), data = IUS_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 70.26773
full_lmer <- lmer(IUS_Score ~ Group * Time + (1|ID), data = IUS_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.6699495
# Mindset Training
IUS_I_p <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "B_POST_IUS_total") %>%
filter(Group == "C_Intervention")
IUS_I_long_p <- IUS_I_p %>%
pivot_longer(cols = c(A_PRE_IUS_total, B_POST_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_I_p <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_I_long_p, REML = TRUE)
summary(IUS_MEM_I_p)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Time + (1 | ID)
## Data: IUS_I_long_p
##
## REML criterion at convergence: 1458.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.51489 -0.43453 0.03273 0.35595 2.42007
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 69.41 8.331
## Residual 33.77 5.812
## Number of obs: 204, groups: ID, 103
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 43.0680 1.0009 139.9412 43.03 < 2e-16 ***
## TimeB_POST_IUS_total -6.3200 0.8165 100.8777 -7.74 7.84e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TB_POST_IUS -0.401
anova (IUS_MEM_I_p)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 2023.5 2023.5 1 100.88 59.912 7.843e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(IUS_MEM_I_p)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -----------------------------------------------------
## (Intercept) | 0.29 | [ 0.11, 0.48]
## Time [B_POST_IUS_total] | -0.59 | [-0.75, -0.44]
# Psychoed
IUS_P_p <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "B_POST_IUS_total") %>%
filter(Group == "B_Controls")
IUS_P_long_p <- IUS_P_p %>%
pivot_longer(cols = c(A_PRE_IUS_total, B_POST_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_P_p <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_P_long_p, REML = TRUE)
summary(IUS_MEM_P_p)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Time + (1 | ID)
## Data: IUS_P_long_p
##
## REML criterion at convergence: 1466.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.89613 -0.42593 -0.04266 0.47538 2.98785
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 82.41 9.078
## Residual 19.72 4.441
## Number of obs: 212, groups: ID, 106
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 42.0283 0.9816 127.1907 42.81 < 2e-16 ***
## TimeB_POST_IUS_total -3.8679 0.6100 105.0000 -6.34 5.87e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TB_POST_IUS -0.311
anova (IUS_MEM_P_p)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 792.92 792.92 1 105 40.2 5.866e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(IUS_MEM_P_p)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -----------------------------------------------------
## (Intercept) | 0.19 | [ 0.00, 0.38]
## Time [B_POST_IUS_total] | -0.38 | [-0.49, -0.26]
# No-Training
IUS_E_p <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "B_POST_IUS_total") %>%
filter(Group == "A_ECs")
IUS_E_long_p <- IUS_E_p %>%
pivot_longer(cols = c(A_PRE_IUS_total, B_POST_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_E_p <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_E_long_p, REML = TRUE)
summary(IUS_MEM_E_p)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Time + (1 | ID)
## Data: IUS_E_long_p
##
## REML criterion at convergence: 650
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.7648 -0.5669 0.0155 0.4452 2.4970
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 50.40 7.10
## Residual 14.59 3.82
## Number of obs: 100, groups: ID, 50
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 41.080 1.140 61.197 36.030 <2e-16 ***
## TimeB_POST_IUS_total -0.280 0.764 49.000 -0.366 0.716
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TB_POST_IUS -0.335
anova (IUS_MEM_E_p)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 1.96 1.96 1 49 0.1343 0.7156
parameters::standardise_parameters(IUS_MEM_E_p)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ----------------------------------------------------
## (Intercept) | 0.02 | [-0.26, 0.30]
## Time [B_POST_IUS_total] | -0.03 | [-0.22, 0.15]
# BF
full_lmer <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_I_long_p, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 2825592191
full_lmer <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_P_long_p, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 3029998
full_lmer <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_E_long_p, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.2040359
m.ef_ius_p<-emmeans(IUS_MEM_BP, "Time", "Group")
eff_size(m.ef_ius_p, sigma = sigma(IUS_MEM_BP), edf = df.residual(IUS_MEM_BP))
## Group = A_ECs:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_IUS_total - B_POST_IUS_total 0.0568 0.200 329 -0.337 0.45
##
## Group = B_Controls:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_IUS_total - B_POST_IUS_total 0.7850 0.140 329 0.510 1.06
##
## Group = C_Intervention:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_IUS_total - B_POST_IUS_total 1.2834 0.146 329 0.996 1.57
##
## sigma used for effect sizes: 4.927
## Degrees-of-freedom method: inherited from kenward-roger when re-gridding
## Confidence level used: 0.95
# Mindset Training
IUS_I_1w <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "C_W1_IUS_total") %>%
filter(Group == "C_Intervention")
IUS_I_long_1w <- IUS_I_1w %>%
pivot_longer(cols = c(A_PRE_IUS_total, C_W1_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_I_1w <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_I_long_1w, REML = TRUE)
summary(IUS_MEM_I_1w)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Time + (1 | ID)
## Data: IUS_I_long_1w
##
## REML criterion at convergence: 1433.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.75154 -0.41446 0.07427 0.44626 2.56493
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 61.29 7.829
## Residual 31.45 5.608
## Number of obs: 203, groups: ID, 103
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 43.0680 0.9489 140.1867 45.386 < 2e-16 ***
## TimeC_W1_IUS_total -4.4842 0.7912 99.1655 -5.668 1.42e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmC_W1_IUS_ -0.407
anova (IUS_MEM_I_1w)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 1010.4 1010.4 1 99.166 32.123 1.424e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(IUS_MEM_I_1w)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------
## (Intercept) | 0.21 | [ 0.02, 0.41]
## Time [C_W1_IUS_total] | -0.46 | [-0.62, -0.30]
# Psychoed
IUS_P_1w <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "C_W1_IUS_total") %>%
filter(Group == "B_Controls")
IUS_P_long_1w <- IUS_P_1w %>%
pivot_longer(cols = c(A_PRE_IUS_total, C_W1_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_P_1w <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_P_long_1w, REML = TRUE)
summary(IUS_MEM_P_1w)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Time + (1 | ID)
## Data: IUS_P_long_1w
##
## REML criterion at convergence: 1467.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.1362 -0.4476 -0.0080 0.4750 2.3101
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 74.91 8.655
## Residual 23.94 4.893
## Number of obs: 210, groups: ID, 106
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 42.0283 0.9657 133.0949 43.520 < 2e-16 ***
## TimeC_W1_IUS_total -1.8758 0.6778 103.7076 -2.768 0.00669 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmC_W1_IUS_ -0.345
anova (IUS_MEM_P_1w)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 183.38 183.38 1 103.71 7.6596 0.006689 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(IUS_MEM_P_1w)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------
## (Intercept) | 0.09 | [-0.10, 0.28]
## Time [C_W1_IUS_total] | -0.19 | [-0.32, -0.05]
# No-Training
IUS_E_1w <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "C_W1_IUS_total") %>%
filter(Group == "A_ECs")
IUS_E_long_1w <- IUS_E_1w %>%
pivot_longer(cols = c(A_PRE_IUS_total, C_W1_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_E_1w <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_E_long_1w, REML = TRUE)
summary(IUS_MEM_E_1w)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Time + (1 | ID)
## Data: IUS_E_long_1w
##
## REML criterion at convergence: 624.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.7506 -0.4373 -0.1144 0.3660 1.9978
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 45.92 6.776
## Residual 12.25 3.500
## Number of obs: 98, groups: ID, 50
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 41.0800 1.0786 60.1817 38.087 <2e-16 ***
## TimeC_W1_IUS_total 0.8932 0.7129 47.6699 1.253 0.216
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmC_W1_IUS_ -0.319
anova (IUS_MEM_E_1w)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 19.23 19.23 1 47.67 1.5701 0.2163
parameters::standardise_parameters(IUS_MEM_E_1w)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------
## (Intercept) | -0.06 | [-0.34, 0.22]
## Time [C_W1_IUS_total] | 0.12 | [-0.07, 0.30]
# BF
full_lmer <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_I_long_1w, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 151951.7
full_lmer <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_P_long_1w, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 4.847665
full_lmer <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_E_long_1w, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.395221
m.ef_ius_1w<-emmeans(IUS_MEM_B1W, "Time", "Group")
eff_size(m.ef_ius_1w, sigma = sigma(IUS_MEM_B1W), edf = df.residual(IUS_MEM_B1W))
## Group = A_ECs:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_IUS_total - C_W1_IUS_total -0.181 0.204 334 -0.582 0.22
##
## Group = B_Controls:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_IUS_total - C_W1_IUS_total 0.377 0.139 334 0.103 0.65
##
## Group = C_Intervention:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_IUS_total - C_W1_IUS_total 0.906 0.144 334 0.623 1.19
##
## sigma used for effect sizes: 4.969
## Degrees-of-freedom method: inherited from kenward-roger when re-gridding
## Confidence level used: 0.95
# Mindset Training
IUS_I_1m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "D_M1_IUS_total") %>%
filter(Group == "C_Intervention")
IUS_I_long_1m <- IUS_I_1m %>%
pivot_longer(cols = c(A_PRE_IUS_total, D_M1_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_I_1m <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_I_long_1m, REML = TRUE)
summary(IUS_MEM_I_1m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Time + (1 | ID)
## Data: IUS_I_long_1m
##
## REML criterion at convergence: 1377.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.21864 -0.50213 0.02461 0.53633 2.12054
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 59.37 7.705
## Residual 33.76 5.811
## Number of obs: 194, groups: ID, 103
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 43.0680 0.9509 140.9831 45.290 < 2e-16 ***
## TimeD_M1_IUS_total -4.7031 0.8523 94.9404 -5.518 2.96e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmD_M1_IUS_ -0.404
anova (IUS_MEM_I_1m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 1028.1 1028.1 1 94.94 30.449 2.961e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(IUS_MEM_I_1m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------
## (Intercept) | 0.22 | [ 0.03, 0.41]
## Time [D_M1_IUS_total] | -0.47 | [-0.64, -0.30]
# Psychoed
IUS_P_1m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "D_M1_IUS_total") %>%
filter(Group == "B_Controls")
IUS_P_long_1m <- IUS_P_1m %>%
pivot_longer(cols = c(A_PRE_IUS_total, D_M1_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_P_1m <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_P_long_1m, REML = TRUE)
summary(IUS_MEM_P_1m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Time + (1 | ID)
## Data: IUS_P_long_1m
##
## REML criterion at convergence: 1431.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.78127 -0.44321 0.07034 0.45684 2.03174
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 69.93 8.363
## Residual 33.21 5.763
## Number of obs: 200, groups: ID, 106
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 42.0283 0.9864 139.0853 42.61 <2e-16 ***
## TimeD_M1_IUS_total -1.7574 0.8329 95.8821 -2.11 0.0375 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmD_M1_IUS_ -0.381
anova (IUS_MEM_P_1m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 147.85 147.85 1 95.882 4.4519 0.03747 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(IUS_MEM_P_1m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------
## (Intercept) | 0.07 | [-0.12, 0.26]
## Time [D_M1_IUS_total] | -0.17 | [-0.34, -0.01]
# No-Training
IUS_E_1m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "D_M1_IUS_total") %>%
filter(Group == "A_ECs")
IUS_E_long_1m <- IUS_E_1m %>%
pivot_longer(cols = c(A_PRE_IUS_total, D_M1_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_E_1m <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_E_long_1m, REML = TRUE)
summary(IUS_MEM_E_1m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Time + (1 | ID)
## Data: IUS_E_long_1m
##
## REML criterion at convergence: 601
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.1175 -0.4876 -0.1018 0.5149 1.5792
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 40.03 6.327
## Residual 13.84 3.720
## Number of obs: 94, groups: ID, 50
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 41.080 1.038 61.951 39.577 < 2e-16 ***
## TimeD_M1_IUS_total 2.197 0.787 44.914 2.791 0.00768 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmD_M1_IUS_ -0.339
anova (IUS_MEM_E_1m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 107.85 107.85 1 44.914 7.7919 0.007679 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(IUS_MEM_E_1m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------
## (Intercept) | -0.14 | [-0.42, 0.13]
## Time [D_M1_IUS_total] | 0.29 | [ 0.09, 0.50]
# BF
full_lmer <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_I_long_1m, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 94753.09
full_lmer <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_P_long_1m, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 1.316734
full_lmer <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_E_long_1m, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 8.081472
m.ef_ius_1m<-emmeans(IUS_MEM_B1M, "Time", "Group")
eff_size(m.ef_ius_1m, sigma = sigma(IUS_MEM_B1M), edf = df.residual(IUS_MEM_B1M))
## Group = A_ECs:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_IUS_total - D_M1_IUS_total -0.405 0.212 342 -0.8209 0.0112
##
## Group = B_Controls:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_IUS_total - D_M1_IUS_total 0.322 0.145 342 0.0367 0.6067
##
## Group = C_Intervention:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_IUS_total - D_M1_IUS_total 0.862 0.149 342 0.5685 1.1564
##
## sigma used for effect sizes: 5.454
## Degrees-of-freedom method: inherited from kenward-roger when re-gridding
## Confidence level used: 0.95
# Mindset Training
IUS_I_3m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "E_M3_IUS_total") %>%
filter(Group == "C_Intervention")
IUS_I_long_3m <- IUS_I_3m %>%
pivot_longer(cols = c(A_PRE_IUS_total, E_M3_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_I_3m <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_I_long_3m, REML = TRUE)
summary(IUS_MEM_I_3m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Time + (1 | ID)
## Data: IUS_I_long_3m
##
## REML criterion at convergence: 1321.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.93055 -0.49721 0.04733 0.51339 2.47288
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 57.67 7.594
## Residual 34.14 5.843
## Number of obs: 186, groups: ID, 103
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 43.0680 0.9441 137.0458 45.616 < 2e-16 ***
## TimeE_M3_IUS_total -3.4270 0.8905 87.2427 -3.848 0.000226 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmE_M3_IUS_ -0.394
anova (IUS_MEM_I_3m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 505.64 505.64 1 87.243 14.81 0.000226 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(IUS_MEM_I_3m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------
## (Intercept) | 0.14 | [-0.06, 0.33]
## Time [E_M3_IUS_total] | -0.36 | [-0.54, -0.17]
# Psychoed
IUS_P_3m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "E_M3_IUS_total") %>%
filter(Group == "B_Controls")
IUS_P_long_3m <- IUS_P_3m %>%
pivot_longer(cols = c(A_PRE_IUS_total, E_M3_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_P_3m <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_P_long_3m, REML = TRUE)
summary(IUS_MEM_P_3m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Time + (1 | ID)
## Data: IUS_P_long_3m
##
## REML criterion at convergence: 1449.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.92457 -0.41016 -0.05984 0.50366 2.41981
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 60.4 7.772
## Residual 38.0 6.165
## Number of obs: 202, groups: ID, 106
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 42.0283 0.9635 149.3179 43.62 <2e-16 ***
## TimeE_M3_IUS_total -2.0545 0.8816 100.0126 -2.33 0.0218 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmE_M3_IUS_ -0.422
anova (IUS_MEM_P_3m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 206.36 206.36 1 100.01 5.4303 0.0218 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(IUS_MEM_P_3m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------
## (Intercept) | 0.10 | [-0.09, 0.29]
## Time [E_M3_IUS_total] | -0.21 | [-0.38, -0.03]
# No-Training
IUS_E_3m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "E_M3_IUS_total") %>%
filter(Group == "A_ECs")
IUS_E_long_3m <- IUS_E_3m %>%
pivot_longer(cols = c(A_PRE_IUS_total, E_M3_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_E_3m <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_E_long_3m, REML = TRUE)
summary(IUS_MEM_E_3m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Time + (1 | ID)
## Data: IUS_E_long_3m
##
## REML criterion at convergence: 585.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.6953 -0.5836 0.0060 0.4994 1.8568
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 33.78 5.812
## Residual 18.74 4.329
## Number of obs: 90, groups: ID, 50
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 41.0800 1.0249 65.8450 40.081 <2e-16 ***
## TimeE_M3_IUS_total 0.6215 0.9507 42.6968 0.654 0.517
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmE_M3_IUS_ -0.385
anova (IUS_MEM_E_3m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 8.0122 8.0122 1 42.697 0.4275 0.5167
parameters::standardise_parameters(IUS_MEM_E_3m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------
## (Intercept) | -0.02 | [-0.30, 0.26]
## Time [E_M3_IUS_total] | 0.09 | [-0.17, 0.35]
# BF
full_lmer <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_I_long_3m, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 141.4927
full_lmer <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_P_long_3m, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 2.254663
full_lmer <- lmer(IUS_Score ~ Time + (1|ID), data = IUS_E_long_3m, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.3107052
m.ef_ius_3m<-emmeans(IUS_MEM_B3m, "Time", "Group")
eff_size(m.ef_ius_3m, sigma = sigma(IUS_MEM_B3m), edf = df.residual(IUS_MEM_B3m))
## Group = A_ECs:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_IUS_total - E_M3_IUS_total -0.107 0.219 352 -0.538 0.325
##
## Group = B_Controls:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_IUS_total - E_M3_IUS_total 0.357 0.144 352 0.075 0.640
##
## Group = C_Intervention:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_IUS_total - E_M3_IUS_total 0.595 0.154 352 0.293 0.898
##
## sigma used for effect sizes: 5.746
## Degrees-of-freedom method: inherited from kenward-roger when re-gridding
## Confidence level used: 0.95
# Intervention vs Psychoed
IUS_BP_IC <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "B_POST_IUS_total") %>%
filter(Group != "A_ECs")
IUS_BP_long_IC <- IUS_BP_IC %>%
pivot_longer(cols = c(A_PRE_IUS_total, B_POST_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_BP_IC <- lmer(IUS_Score ~ Group * Time + (1|ID), data = IUS_BP_long_IC, REML = TRUE)
summary(IUS_MEM_BP_IC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Group * Time + (1 | ID)
## Data: IUS_BP_long_IC
##
## REML criterion at convergence: 2932.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.82123 -0.43408 0.01576 0.42315 2.74006
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 76.04 8.720
## Residual 26.59 5.156
## Number of obs: 416, groups: ID, 209
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 42.0283 0.9840 266.9103 42.714
## GroupC_Intervention 1.0397 1.4016 266.9103 0.742
## TimeB_POST_IUS_total -3.8679 0.7083 205.2694 -5.461
## GroupC_Intervention:TimeB_POST_IUS_total -2.4555 1.0133 205.7308 -2.423
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## GroupC_Intervention 0.4589
## TimeB_POST_IUS_total 1.36e-07 ***
## GroupC_Intervention:TimeB_POST_IUS_total 0.0163 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpC_I TB_POS
## GrpC_Intrvn -0.702
## TB_POST_IUS -0.360 0.253
## GC_I:TB_POS 0.252 -0.358 -0.699
anova (IUS_MEM_BP_IC)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 0.55 0.55 1 207.22 0.0207 0.88583
## Time 2689.38 2689.38 1 205.73 101.1464 < 2e-16 ***
## Group:Time 156.13 156.13 1 205.73 5.8719 0.01625 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(IUS_MEM_BP_IC)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ------------------------------------------------------------------------------
## (Intercept) | 0.19 | [ 0.01, 0.38]
## Group [C_Intervention] | 0.10 | [-0.16, 0.36]
## Time [B_POST_IUS_total] | -0.37 | [-0.50, -0.24]
## Group [C_Intervention] × Time [B_POST_IUS_total] | -0.24 | [-0.43, -0.04]
# BF
full_lmer <- lmer(IUS_Score ~ Group * Time + (1|ID), data = IUS_BP_long_IC, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 2.279354
# Intervention vs Psychoed
IUS_B1W_IC <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "C_W1_IUS_total") %>%
filter(Group != "A_ECs")
IUS_B1W_long_IC <- IUS_B1W_IC %>%
pivot_longer(cols = c(A_PRE_IUS_total, C_W1_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_B1W_IC <- lmer(IUS_Score ~ Group * Time + (1|ID), data = IUS_B1W_long_IC, REML = TRUE)
summary(IUS_MEM_B1W_IC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Group * Time + (1 | ID)
## Data: IUS_B1W_long_IC
##
## REML criterion at convergence: 2902.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.89876 -0.43691 0.03033 0.45405 2.74965
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 68.32 8.265
## Residual 27.60 5.253
## Number of obs: 413, groups: ID, 209
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 42.0283 0.9512 272.7572 44.184
## GroupC_Intervention 1.0397 1.3550 272.7572 0.767
## TimeC_W1_IUS_total -1.8705 0.7275 202.7497 -2.571
## GroupC_Intervention:TimeC_W1_IUS_total -2.6297 1.0387 203.0139 -2.532
## Pr(>|t|)
## (Intercept) <2e-16 ***
## GroupC_Intervention 0.4436
## TimeC_W1_IUS_total 0.0109 *
## GroupC_Intervention:TimeC_W1_IUS_total 0.0121 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpC_I TC_W1_
## GrpC_Intrvn -0.702
## TmC_W1_IUS_ -0.376 0.264
## GC_I:TC_W1_ 0.263 -0.375 -0.700
anova (IUS_MEM_B1W_IC)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 1.32 1.32 1 206.62 0.048 0.82677
## Time 1038.14 1038.14 1 203.01 37.619 4.422e-09 ***
## Group:Time 176.89 176.89 1 203.01 6.410 0.01211 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(IUS_MEM_B1W_IC)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ----------------------------------------------------------------------------
## (Intercept) | 0.10 | [-0.09, 0.29]
## Group [C_Intervention] | 0.11 | [-0.16, 0.37]
## Time [C_W1_IUS_total] | -0.19 | [-0.33, -0.04]
## Group [C_Intervention] × Time [C_W1_IUS_total] | -0.27 | [-0.47, -0.06]
# BF
full_lmer <- lmer(IUS_Score ~ Group * Time + (1|ID), data = IUS_B1W_long_IC, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 3.039647
# Intervention vs Psychoed
IUS_B1M_IC <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_IUS_total", "D_M1_IUS_total") %>%
filter(Group != "A_ECs")
IUS_B1M_long_IC <- IUS_B1M_IC %>%
pivot_longer(cols = c(A_PRE_IUS_total, D_M1_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
IUS_MEM_B1M_IC <- lmer(IUS_Score ~ Group * Time + (1|ID), data = IUS_B1M_long_IC, REML = TRUE)
summary(IUS_MEM_B1M_IC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: IUS_Score ~ Group * Time + (1 | ID)
## Data: IUS_B1M_long_IC
##
## REML criterion at convergence: 2809.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.80590 -0.47119 0.03281 0.50869 2.12660
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 64.68 8.042
## Residual 33.50 5.788
## Number of obs: 394, groups: ID, 209
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 42.0283 0.9624 279.8189 43.670
## GroupC_Intervention 1.0397 1.3709 279.8189 0.758
## TimeD_M1_IUS_total -1.7518 0.8361 190.5635 -2.095
## GroupC_Intervention:TimeD_M1_IUS_total -2.9519 1.1920 190.6589 -2.476
## Pr(>|t|)
## (Intercept) <2e-16 ***
## GroupC_Intervention 0.4489
## TimeD_M1_IUS_total 0.0375 *
## GroupC_Intervention:TimeD_M1_IUS_total 0.0141 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpC_I TD_M1_
## GrpC_Intrvn -0.702
## TmD_M1_IUS_ -0.393 0.276
## GC_I:TD_M1_ 0.276 -0.392 -0.701
anova (IUS_MEM_B1M_IC)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 4.00 4.00 1 207.59 0.1195 0.72996
## Time 982.72 982.72 1 190.66 29.3311 1.823e-07 ***
## Group:Time 205.48 205.48 1 190.66 6.1330 0.01414 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(IUS_MEM_B1M_IC)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ----------------------------------------------------------------------------
## (Intercept) | 0.09 | [-0.09, 0.28]
## Group [C_Intervention] | 0.10 | [-0.16, 0.37]
## Time [D_M1_IUS_total] | -0.17 | [-0.34, -0.01]
## Group [C_Intervention] × Time [D_M1_IUS_total] | -0.29 | [-0.53, -0.06]
# BF
full_lmer <- lmer(IUS_Score ~ Group * Time + (1|ID), data = IUS_B1M_long_IC, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 3.135853
GAD_alltimepoints <- Full_data %>%
dplyr::select("A_PRE_GAD_total", "C_W1_GAD_total", "D_M1_GAD_total", "E_M3_GAD_total", "Group") %>%
pivot_longer(cols = c(A_PRE_GAD_total, C_W1_GAD_total, D_M1_GAD_total, E_M3_GAD_total),
names_to = "Time",
values_to = "GAD_Score")
d <- GAD_alltimepoints %>%
mutate(Time=case_when(
Time == "A_PRE_GAD_total" ~ "Baseline",
Time == "C_W1_GAD_total" ~ "1 Week",
Time == "D_M1_GAD_total" ~ "1 Month",
Time == "E_M3_GAD_total" ~ "3 Months"
)) %>%
mutate(Time=factor(Time, levels=c("Baseline", "1 Week", "1 Month", "3 Months"))) %>%
mutate(Group=case_when(
Group == "A_ECs" ~ "\nNo-Training\nControl",
Group == "B_Controls" ~ "\nPsychoeducation\nControl",
Group == "C_Intervention" ~ "\nUncertainty-Mindsets\nTraining")) %>%
mutate(Group=factor(Group, levels=c("\nNo-Training\nControl", "\nPsychoeducation\nControl", "\nUncertainty-Mindsets\nTraining"))) %>%
ggplot(aes(x = Time, y = GAD_Score, color = Group, fill = Group, group = Group)) +
#stat_summary(fun = mean, geom = "line") + # Calculate and plot the mean as a line
stat_summary(fun = mean, geom = "point") + # Add points at the mean values
scale_y_continuous(name = "Anxiety Symptoms") +
theme_bw() +
theme(legend.position = "none") +
geom_smooth(se = TRUE, level = 0.95, alpha = 0.25)
GAD_gg <- ggMarginal(d,groupColour = TRUE, groupFill = TRUE, type = "density")
## Warning: Removed 80 rows containing non-finite outside the scale range
## (`stat_summary()`).
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning: Removed 80 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 9.7661e-16
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 9.7661e-16
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 1.5368e-15
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 1.5368e-15
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 1.5795e-15
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 1.5795e-15
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning: Removed 80 rows containing non-finite outside the scale range
## (`stat_summary()`).
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning: Removed 80 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 9.7661e-16
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 9.7661e-16
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 1.5368e-15
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 1.5368e-15
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 1.5795e-15
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 1.5795e-15
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x < range[1], value =
## "Baseline"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x > range[2], value = "1
## Week"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x < range[1], value =
## "Baseline"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x > range[2], value = "1
## Week"): NAs introduced by coercion
## Warning: Removed 12 rows containing non-finite outside the scale range
## (`stat_density()`).
## Removed 12 rows containing non-finite outside the scale range
## (`stat_density()`).
## Warning: No shared levels found between `names(values)` of the manual scale and the
## data's colour values.
## Warning: No shared levels found between `names(values)` of the manual scale and the
## data's fill values.
GAD_gg
GAD_B1W <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GAD_total", "C_W1_GAD_total")
GAD_B1W_long <- GAD_B1W %>%
pivot_longer(cols = c(A_PRE_GAD_total, C_W1_GAD_total),
names_to = "Time",
values_to = "GAD_Score")
GAD_MEM_B1W <- lmer(GAD_Score ~ Group * Time + (1|ID), data = GAD_B1W_long, REML = TRUE)
summary(GAD_MEM_B1W)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GAD_Score ~ Group * Time + (1 | ID)
## Data: GAD_B1W_long
##
## REML criterion at convergence: 3025.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.0453 -0.4584 -0.0843 0.4595 3.1840
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 22.202 4.712
## Residual 9.297 3.049
## Number of obs: 510, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 8.0200 0.7937 340.7093 10.104
## GroupB_Controls 0.4706 0.9629 340.7093 0.489
## GroupC_Intervention 1.2616 0.9674 340.7093 1.304
## TimeC_W1_GAD_total 0.3104 0.6206 252.2282 0.500
## GroupB_Controls:TimeC_W1_GAD_total -0.9286 0.7516 251.9901 -1.236
## GroupC_Intervention:TimeC_W1_GAD_total -1.3167 0.7551 252.0024 -1.744
## Pr(>|t|)
## (Intercept) <2e-16 ***
## GroupB_Controls 0.6254
## GroupC_Intervention 0.1931
## TimeC_W1_GAD_total 0.6174
## GroupB_Controls:TimeC_W1_GAD_total 0.2178
## GroupC_Intervention:TimeC_W1_GAD_total 0.0824 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TC_W1_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmC_W1_GAD_ -0.378 0.311 0.310
## GB_C:TC_W1_ 0.312 -0.378 -0.256 -0.826
## GC_I:TC_W1_ 0.310 -0.256 -0.378 -0.822 0.679
anova (GAD_MEM_B1W)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 7.671 3.8355 2 257.54 0.4125 0.6624
## Time 21.411 21.4112 1 251.88 2.3030 0.1304
## Group:Time 28.314 14.1572 2 251.80 1.5228 0.2201
performance::r2(GAD_MEM_B1W)
## # R2 for Mixed Models
##
## Conditional R2: 0.707
## Marginal R2: 0.007
parameters::standardise_parameters(GAD_MEM_B1W)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------------------------------
## (Intercept) | -0.07 | [-0.35, 0.20]
## Group [B_Controls] | 0.08 | [-0.25, 0.42]
## Group [C_Intervention] | 0.22 | [-0.11, 0.56]
## Time [C_W1_GAD_total] | 0.06 | [-0.16, 0.27]
## Group [B_Controls] × Time [C_W1_GAD_total] | -0.17 | [-0.43, 0.10]
## Group [C_Intervention] × Time [C_W1_GAD_total] | -0.23 | [-0.50, 0.03]
# BF
full_lmer <- lmer(GAD_Score ~ Group + Time + (1|ID), data = GAD_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.01108104
full_lmer <- lmer(GAD_Score ~ Group + Time + (1|ID), data = GAD_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.3252588
full_lmer <- lmer(GAD_Score ~ Group * Time + (1|ID), data = GAD_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.02352804
GAD_B1M <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GAD_total", "D_M1_GAD_total")
GAD_B1M_long <- GAD_B1M %>%
pivot_longer(cols = c(A_PRE_GAD_total, D_M1_GAD_total),
names_to = "Time",
values_to = "GAD_Score")
GAD_MEM_B1M <- lmer(GAD_Score ~ Group * Time + (1|ID), data = GAD_B1M_long, REML = TRUE)
summary(GAD_MEM_B1M)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GAD_Score ~ Group * Time + (1 | ID)
## Data: GAD_B1M_long
##
## REML criterion at convergence: 2951
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.26184 -0.51370 -0.07266 0.47118 2.72886
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 19.51 4.417
## Residual 12.64 3.555
## Number of obs: 486, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 8.0200 0.8018 361.1090 10.002
## GroupB_Controls 0.4706 0.9727 361.1090 0.484
## GroupC_Intervention 1.2616 0.9772 361.1090 1.291
## TimeD_M1_GAD_total 1.2587 0.7560 238.1128 1.665
## GroupB_Controls:TimeD_M1_GAD_total -2.2184 0.9147 237.6716 -2.425
## GroupC_Intervention:TimeD_M1_GAD_total -3.0251 0.9181 237.5072 -3.295
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## GroupB_Controls 0.62884
## GroupC_Intervention 0.19755
## TimeD_M1_GAD_total 0.09724 .
## GroupB_Controls:TimeD_M1_GAD_total 0.01605 *
## GroupC_Intervention:TimeD_M1_GAD_total 0.00113 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TD_M1_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmD_M1_GAD_ -0.417 0.344 0.342
## GB_C:TD_M1_ 0.345 -0.418 -0.283 -0.826
## GC_I:TD_M1_ 0.343 -0.283 -0.418 -0.823 0.681
anova (GAD_MEM_B1M)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 7.574 3.787 2 258.32 0.2997 0.741299
## Time 24.554 24.554 1 237.32 1.9431 0.164633
## Group:Time 137.971 68.986 2 237.14 5.4594 0.004808 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(GAD_MEM_B1M)
## # R2 for Mixed Models
##
## Conditional R2: 0.613
## Marginal R2: 0.016
parameters::standardise_parameters(GAD_MEM_B1M)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ----------------------------------------------------------------------------
## (Intercept) | -0.05 | [-0.32, 0.23]
## Group [B_Controls] | 0.08 | [-0.25, 0.42]
## Group [C_Intervention] | 0.22 | [-0.12, 0.56]
## Time [D_M1_GAD_total] | 0.22 | [-0.04, 0.48]
## Group [B_Controls] × Time [D_M1_GAD_total] | -0.39 | [-0.70, -0.07]
## Group [C_Intervention] × Time [D_M1_GAD_total] | -0.53 | [-0.85, -0.21]
# BF
full_lmer <- lmer(GAD_Score ~ Group + Time + (1|ID), data = GAD_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.009551524
full_lmer <- lmer(GAD_Score ~ Group + Time + (1|ID), data = GAD_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.9999603
full_lmer <- lmer(GAD_Score ~ Group * Time + (1|ID), data = GAD_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 1.697957
GAD_B3m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GAD_total", "E_M3_GAD_total")
GAD_B3m_long <- GAD_B3m %>%
pivot_longer(cols = c(A_PRE_GAD_total, E_M3_GAD_total),
names_to = "Time",
values_to = "GAD_Score")
GAD_MEM_B3m <- lmer(GAD_Score ~ Group * Time + (1|ID), data = GAD_B3m_long, REML = TRUE)
summary(GAD_MEM_B3m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GAD_Score ~ Group * Time + (1 | ID)
## Data: GAD_B3m_long
##
## REML criterion at convergence: 2943.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.4081 -0.5700 -0.1293 0.5775 2.8275
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 17.55 4.189
## Residual 15.45 3.931
## Number of obs: 478, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 8.0200 0.8124 377.1821 9.872
## GroupB_Controls 0.4706 0.9855 377.1821 0.477
## GroupC_Intervention 1.2616 0.9901 377.1821 1.274
## TimeE_M3_GAD_total 1.3234 0.8669 238.1434 1.526
## GroupB_Controls:TimeE_M3_GAD_total -1.8557 1.0314 234.4198 -1.799
## GroupC_Intervention:TimeE_M3_GAD_total -1.8047 1.0521 237.3390 -1.715
## Pr(>|t|)
## (Intercept) <2e-16 ***
## GroupB_Controls 0.6333
## GroupC_Intervention 0.2034
## TimeE_M3_GAD_total 0.1282
## GroupB_Controls:TimeE_M3_GAD_total 0.0733 .
## GroupC_Intervention:TimeE_M3_GAD_total 0.0876 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TE_M3_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmE_M3_GAD_ -0.439 0.362 0.360
## GB_C:TE_M3_ 0.369 -0.447 -0.303 -0.841
## GC_I:TE_M3_ 0.362 -0.298 -0.441 -0.824 0.693
anova (GAD_MEM_B3m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 20.577 10.289 2 258.46 0.6658 0.5147
## Time 1.044 1.044 1 234.73 0.0676 0.7951
## Group:Time 56.555 28.277 2 233.78 1.8300 0.1627
performance::r2(GAD_MEM_B3m)
## # R2 for Mixed Models
##
## Conditional R2: 0.536
## Marginal R2: 0.008
parameters::standardise_parameters(GAD_MEM_B3m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------------------------------
## (Intercept) | -0.11 | [-0.39, 0.17]
## Group [B_Controls] | 0.08 | [-0.26, 0.42]
## Group [C_Intervention] | 0.22 | [-0.12, 0.56]
## Time [E_M3_GAD_total] | 0.23 | [-0.07, 0.53]
## Group [B_Controls] × Time [E_M3_GAD_total] | -0.32 | [-0.68, 0.03]
## Group [C_Intervention] × Time [E_M3_GAD_total] | -0.31 | [-0.67, 0.05]
# BF
full_lmer <- lmer(GAD_Score ~ Group + Time + (1|ID), data = GAD_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.01510159
full_lmer <- lmer(GAD_Score ~ Group + Time + (1|ID), data = GAD_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.04757796
full_lmer <- lmer(GAD_Score ~ Group * Time + (1|ID), data = GAD_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.06369044
# Intervention
GAD_I <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GAD_total", "D_M1_GAD_total") %>%
filter(Group == "C_Intervention")
GAD_I_long <- GAD_I %>%
pivot_longer(cols = c("A_PRE_GAD_total", "D_M1_GAD_total"),
names_to = "Time",
values_to = "GAD_Score")
GAD_MEM_I <- lmer(GAD_Score ~ Time + (1|ID), data = GAD_I_long, REML = TRUE)
summary(GAD_MEM_I)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GAD_Score ~ Time + (1 | ID)
## Data: GAD_I_long
##
## REML criterion at convergence: 1163.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.87146 -0.49947 -0.05659 0.46378 2.64376
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 20.51 4.529
## Residual 10.71 3.272
## Number of obs: 194, groups: ID, 103
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 9.2816 0.5505 138.8771 16.859 < 2e-16 ***
## TimeD_M1_GAD_total -1.7738 0.4802 94.9178 -3.694 0.000369 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmD_M1_GAD_ -0.393
anova (GAD_MEM_I)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 146.07 146.07 1 94.918 13.644 0.0003692 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(GAD_MEM_I)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------
## (Intercept) | 0.14 | [-0.05, 0.33]
## Time [D_M1_GAD_total] | -0.31 | [-0.48, -0.15]
# Psychoeducation
GAD_C <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GAD_total", "D_M1_GAD_total") %>%
filter(Group == "B_Controls")
GAD_C_long <- GAD_C %>%
pivot_longer(cols = c("A_PRE_GAD_total", "D_M1_GAD_total"),
names_to = "Time",
values_to = "GAD_Score")
GAD_MEM_C <- lmer(GAD_Score ~ Time + (1|ID), data = GAD_C_long, REML = TRUE)
summary(GAD_MEM_C)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GAD_Score ~ Time + (1 | ID)
## Data: GAD_C_long
##
## REML criterion at convergence: 1228
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.0529 -0.5318 -0.1244 0.5077 2.5684
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 19.46 4.412
## Residual 14.73 3.838
## Number of obs: 199, groups: ID, 106
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 8.4906 0.5679 151.5975 14.950 <2e-16 ***
## TimeD_M1_GAD_total -0.9713 0.5553 96.1529 -1.749 0.0835 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmD_M1_GAD_ -0.441
anova (GAD_MEM_C)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 45.057 45.057 1 96.153 3.0594 0.08346 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(GAD_MEM_C)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------
## (Intercept) | 0.09 | [-0.10, 0.28]
## Time [D_M1_GAD_total] | -0.17 | [-0.35, 0.02]
# No-Training
GAD_EC <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GAD_total", "D_M1_GAD_total") %>%
filter(Group == "A_ECs")
GAD_EC_long <- GAD_EC %>%
pivot_longer(cols = c(A_PRE_GAD_total, D_M1_GAD_total),
names_to = "Time",
values_to = "GAD_Score")
GAD_MEM_EC <- lmer(GAD_Score ~ Time + (1|ID), data = GAD_EC_long, REML = TRUE)
summary(GAD_MEM_EC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GAD_Score ~ Time + (1 | ID)
## Data: GAD_EC_long
##
## REML criterion at convergence: 556.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.29057 -0.48426 -0.04936 0.43148 2.49256
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 17.32 4.162
## Residual 12.26 3.501
## Number of obs: 93, groups: ID, 50
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 8.0200 0.7692 70.4944 10.427 6.29e-16 ***
## TimeD_M1_GAD_total 1.2538 0.7440 45.7110 1.685 0.0988 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmD_M1_GAD_ -0.428
anova (GAD_MEM_EC)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 34.809 34.809 1 45.711 2.8398 0.09877 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(GAD_MEM_EC)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------
## (Intercept) | -0.09 | [-0.37, 0.18]
## Time [D_M1_GAD_total] | 0.23 | [-0.04, 0.50]
# BF
full_lmer <- lmer(GAD_Score ~ Time + (1|ID), data = GAD_I_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 52.05475
full_lmer <- lmer(GAD_Score ~ Time + (1|ID), data = GAD_C_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.4528085
full_lmer <- lmer(GAD_Score ~ Time + (1|ID), data = GAD_EC_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.7801084
m.ef_gad_1m <- emmeans(GAD_MEM_B1M, "Time", "Group")
eff_size(m.ef_gad_1m, sigma = sigma(GAD_MEM_B1M), edf = df.residual(GAD_MEM_B1M))
## Group = A_ECs:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_GAD_total - D_M1_GAD_total -0.354 0.213 359 -0.7731 0.0649
##
## Group = B_Controls:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_GAD_total - D_M1_GAD_total 0.270 0.145 359 -0.0155 0.5555
##
## Group = C_Intervention:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_GAD_total - D_M1_GAD_total 0.497 0.147 359 0.2069 0.7869
##
## sigma used for effect sizes: 3.555
## Degrees-of-freedom method: inherited from kenward-roger when re-gridding
## Confidence level used: 0.95
Mediation.GADchange.1W <-
'#regressions
GAD_B1W_change ~ c1 * Group
IUS_B1W_change ~ a1 * Group
GAD_B1W_change ~ b1*IUS_B1W_change
indirect1 := a1 * b1
direct := c1
total := c1 + (a1 * b1)
'
group.IUS.GAD.1W <- sem(Mediation.GADchange.1W, data=Full_data, std.lv=T, std.ov=T, missing='fiml', se='robust', estimator='mlr', auto.var = T)
summary(group.IUS.GAD.1W, standardized=T, rsquare=T, ci = T)
## lavaan 0.6-19 ended normally after 15 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 7
##
## Number of observations 259
## Number of missing patterns 3
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 0.000 0.000
## Degrees of freedom 0 0
##
## Parameter Estimates:
##
## Standard errors Sandwich
## Information bread Observed
## Observed information based on Hessian
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## GAD_B1W_change ~
## Group (c1) -0.059 0.083 -0.713 0.476 -0.223 0.104
## IUS_B1W_change ~
## Group (a1) -0.374 0.076 -4.913 0.000 -0.523 -0.225
## GAD_B1W_change ~
## IUS_B1W_c (b1) 0.212 0.082 2.592 0.010 0.052 0.373
## Std.lv Std.all
##
## -0.059 -0.044
##
## -0.374 -0.278
##
## 0.212 0.212
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .GAD_B1W_change 0.130 0.178 0.731 0.465 -0.219 0.479
## .IUS_B1W_change 0.826 0.161 5.135 0.000 0.510 1.141
## Std.lv Std.all
## 0.130 0.130
## 0.826 0.827
##
## Variances:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .GAD_B1W_change 0.944 0.138 6.823 0.000 0.673 1.215
## .IUS_B1W_change 0.920 0.116 7.943 0.000 0.693 1.147
## Std.lv Std.all
## 0.944 0.948
## 0.920 0.923
##
## R-Square:
## Estimate
## GAD_B1W_change 0.052
## IUS_B1W_change 0.077
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## indirect1 -0.079 0.036 -2.235 0.025 -0.149 -0.010
## direct -0.059 0.083 -0.713 0.476 -0.223 0.104
## total -0.139 0.079 -1.759 0.079 -0.294 0.016
## Std.lv Std.all
## -0.079 -0.059
## -0.059 -0.044
## -0.139 -0.103
Mediation.GADchange.1M <-
'#regressions
GAD_B1M_change ~ c1 * Group
IUS_B1M_change ~ a1 * Group
GAD_B1M_change ~ b1*IUS_B1M_change
indirect1 := a1 * b1
direct := c1
total := c1 + (a1 * b1)
'
group.IUS.GAD.1M <- sem(Mediation.GADchange.1M, data=Full_data, std.lv=T, std.ov=T, missing='fiml', se='robust', estimator='mlr', auto.var = T)
summary(group.IUS.GAD.1M, standardized=T, rsquare=T, ci = T)
## lavaan 0.6-19 ended normally after 17 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 7
##
## Number of observations 259
## Number of missing patterns 4
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 0.000 0.000
## Degrees of freedom 0 0
##
## Parameter Estimates:
##
## Standard errors Sandwich
## Information bread Observed
## Observed information based on Hessian
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## GAD_B1M_change ~
## Group (c1) -0.147 0.093 -1.587 0.113 -0.329 0.035
## IUS_B1M_change ~
## Group (a1) -0.413 0.076 -5.463 0.000 -0.561 -0.265
## GAD_B1M_change ~
## IUS_B1M_c (b1) 0.338 0.091 3.714 0.000 0.160 0.517
## Std.lv Std.all
##
## -0.147 -0.109
##
## -0.413 -0.307
##
## 0.338 0.337
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .GAD_B1M_change 0.320 0.217 1.473 0.141 -0.106 0.745
## .IUS_B1M_change 0.909 0.163 5.566 0.000 0.589 1.230
## Std.lv Std.all
## 0.320 0.319
## 0.909 0.912
##
## Variances:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .GAD_B1M_change 0.854 0.104 8.239 0.000 0.651 1.057
## .IUS_B1M_change 0.901 0.101 8.900 0.000 0.703 1.099
## Std.lv Std.all
## 0.854 0.852
## 0.901 0.906
##
## R-Square:
## Estimate
## GAD_B1M_change 0.148
## IUS_B1M_change 0.094
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## indirect1 -0.140 0.046 -3.048 0.002 -0.230 -0.050
## direct -0.147 0.093 -1.587 0.113 -0.329 0.035
## total -0.287 0.084 -3.405 0.001 -0.452 -0.122
## Std.lv Std.all
## -0.140 -0.103
## -0.147 -0.109
## -0.287 -0.212
Mediation.GADchange.3M <-
'#regressions
GAD_B3M_change ~ c1 * Group
IUS_B3M_change ~ a1 * Group
GAD_B3M_change ~ b1*IUS_B3M_change
indirect1 := a1 * b1
direct := c1
total := c1 + (a1 * b1)
'
group.IUS.GAD.3M <- sem(Mediation.GADchange.3M, data=Full_data, std.lv=T, std.ov=T, missing='fiml', se='robust', estimator='mlr', auto.var = T)
summary(group.IUS.GAD.3M, standardized=T, rsquare=T, ci = T)
## lavaan 0.6-19 ended normally after 16 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 7
##
## Number of observations 259
## Number of missing patterns 4
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 0.000 0.000
## Degrees of freedom 0 0
##
## Parameter Estimates:
##
## Standard errors Sandwich
## Information bread Observed
## Observed information based on Hessian
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## GAD_B3M_change ~
## Group (c1) -0.084 0.081 -1.039 0.299 -0.243 0.075
## IUS_B3M_change ~
## Group (a1) -0.260 0.082 -3.179 0.001 -0.420 -0.100
## GAD_B3M_change ~
## IUS_B3M_c (b1) 0.358 0.083 4.302 0.000 0.195 0.521
## Std.lv Std.all
##
## -0.084 -0.063
##
## -0.260 -0.193
##
## 0.358 0.359
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .GAD_B3M_change 0.185 0.178 1.038 0.299 -0.164 0.534
## .IUS_B3M_change 0.568 0.183 3.109 0.002 0.210 0.927
## Std.lv Std.all
## 0.185 0.185
## 0.568 0.569
##
## Variances:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .GAD_B3M_change 0.855 0.081 10.527 0.000 0.696 1.015
## .IUS_B3M_change 0.961 0.125 7.683 0.000 0.716 1.206
## Std.lv Std.all
## 0.855 0.859
## 0.961 0.963
##
## R-Square:
## Estimate
## GAD_B3M_change 0.141
## IUS_B3M_change 0.037
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## indirect1 -0.093 0.041 -2.276 0.023 -0.173 -0.013
## direct -0.084 0.081 -1.039 0.299 -0.243 0.075
## total -0.177 0.089 -1.997 0.046 -0.351 -0.003
## Std.lv Std.all
## -0.093 -0.069
## -0.084 -0.063
## -0.177 -0.132
PHQ_alltimepoints <- Full_data %>%
dplyr::select("A_PRE_PHQ_total", "C_W1_PHQ_total", "D_M1_PHQ_total", "E_M3_PHQ_total", "Group") %>%
pivot_longer(cols = c(A_PRE_PHQ_total, C_W1_PHQ_total, D_M1_PHQ_total, E_M3_PHQ_total),
names_to = "Time",
values_to = "PHQ_Score")
c <- PHQ_alltimepoints %>%
mutate(Time=case_when(
Time == "A_PRE_PHQ_total" ~ "Baseline",
Time == "C_W1_PHQ_total" ~ "1 Week",
Time == "D_M1_PHQ_total" ~ "1 Month",
Time == "E_M3_PHQ_total" ~ "3 Months"
)) %>%
mutate(Time=factor(Time, levels=c("Baseline", "1 Week", "1 Month", "3 Months"))) %>%
mutate(Group=case_when(
Group == "A_ECs" ~ "\nNo-Training\nControl",
Group == "B_Controls" ~ "\nPsychoeducation\nControl",
Group == "C_Intervention" ~ "\nUncertainty-Mindsets\nTraining")) %>%
mutate(Group=factor(Group, levels=c("\nNo-Training\nControl", "\nPsychoeducation\nControl", "\nUncertainty-Mindsets\nTraining"))) %>%
ggplot(aes(x = Time, y = PHQ_Score, color = Group, fill = Group, group = Group)) +
#stat_summary(fun = mean, geom = "line") + # Calculate and plot the mean as a line
stat_summary(fun = mean, geom = "point") + # Add points at the mean values
scale_y_continuous(name = "Depression Symptoms") +
theme_bw() +
theme(legend.position = "none") +
geom_smooth(se = TRUE, level = 0.95, alpha = 0.25)
PHQ_gg <- ggMarginal(c,groupColour = TRUE, groupFill = TRUE, type = "density")
## Warning: Removed 79 rows containing non-finite outside the scale range
## (`stat_summary()`).
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning: Removed 79 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 9.7661e-16
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 9.7661e-16
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 1.5368e-15
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 1.5368e-15
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 1.5795e-15
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 1.5795e-15
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning: Removed 79 rows containing non-finite outside the scale range
## (`stat_summary()`).
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning: Removed 79 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 9.7661e-16
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 9.7661e-16
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 1.5368e-15
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 1.5368e-15
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 1.5795e-15
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 1.5795e-15
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x < range[1], value =
## "Baseline"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x > range[2], value = "1
## Week"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x < range[1], value =
## "Baseline"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x > range[2], value = "1
## Week"): NAs introduced by coercion
## Warning: Removed 12 rows containing non-finite outside the scale range
## (`stat_density()`).
## Removed 12 rows containing non-finite outside the scale range
## (`stat_density()`).
## Warning: No shared levels found between `names(values)` of the manual scale and the
## data's colour values.
## Warning: No shared levels found between `names(values)` of the manual scale and the
## data's fill values.
PHQ_gg
PHQ_B1W <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_PHQ_total", "C_W1_PHQ_total")
PHQ_B1W_long <- PHQ_B1W %>%
pivot_longer(cols = c(A_PRE_PHQ_total, C_W1_PHQ_total),
names_to = "Time",
values_to = "PHQ_Score")
PHQ_MEM_B1W <- lmer(PHQ_Score ~ Group * Time + (1|ID), data = PHQ_B1W_long, REML = TRUE)
summary(PHQ_MEM_B1W)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PHQ_Score ~ Group * Time + (1 | ID)
## Data: PHQ_B1W_long
##
## REML criterion at convergence: 3069.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.70427 -0.49822 -0.04073 0.44204 3.13898
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 24.53 4.953
## Residual 10.07 3.173
## Number of obs: 510, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 9.9600 0.8318 339.2793 11.974
## GroupB_Controls -0.5166 1.0091 339.2793 -0.512
## GroupC_Intervention 0.7196 1.0138 339.2793 0.710
## TimeC_W1_PHQ_total -0.1012 0.6458 252.0371 -0.157
## GroupB_Controls:TimeC_W1_PHQ_total -0.7976 0.7821 251.8019 -1.020
## GroupC_Intervention:TimeC_W1_PHQ_total -1.3587 0.7858 251.8141 -1.729
## Pr(>|t|)
## (Intercept) <2e-16 ***
## GroupB_Controls 0.609
## GroupC_Intervention 0.478
## TimeC_W1_PHQ_total 0.876
## GroupB_Controls:TimeC_W1_PHQ_total 0.309
## GroupC_Intervention:TimeC_W1_PHQ_total 0.085 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TC_W1_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmC_W1_PHQ_ -0.375 0.309 0.308
## GB_C:TC_W1_ 0.309 -0.375 -0.254 -0.826
## GC_I:TC_W1_ 0.308 -0.254 -0.375 -0.822 0.679
anova (PHQ_MEM_B1W)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 18.876 9.438 2 257.38 0.9375 0.39294
## Time 75.005 75.005 1 251.69 7.4503 0.00679 **
## Group:Time 30.533 15.266 2 251.61 1.5164 0.22149
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(PHQ_MEM_B1W)
## # R2 for Mixed Models
##
## Conditional R2: 0.713
## Marginal R2: 0.015
parameters::standardise_parameters(PHQ_MEM_B1W)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------------------------------
## (Intercept) | 0.07 | [-0.21, 0.34]
## Group [B_Controls] | -0.09 | [-0.42, 0.25]
## Group [C_Intervention] | 0.12 | [-0.22, 0.46]
## Time [C_W1_PHQ_total] | -0.02 | [-0.23, 0.20]
## Group [B_Controls] × Time [C_W1_PHQ_total] | -0.13 | [-0.39, 0.13]
## Group [C_Intervention] × Time [C_W1_PHQ_total] | -0.23 | [-0.49, 0.03]
# BF
full_lmer <- lmer(PHQ_Score ~ Group + Time + (1|ID), data = PHQ_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.02038741
full_lmer <- lmer(PHQ_Score ~ Group + Time + (1|ID), data = PHQ_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 9.848049
full_lmer <- lmer(PHQ_Score ~ Group * Time + (1|ID), data = PHQ_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.02531879
PHQ_B1M <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_PHQ_total", "D_M1_PHQ_total")
PHQ_B1M_long <- PHQ_B1M %>%
pivot_longer(cols = c(A_PRE_PHQ_total, D_M1_PHQ_total),
names_to = "Time",
values_to = "PHQ_Score")
PHQ_MEM_B1M <- lmer(PHQ_Score ~ Group * Time + (1|ID), data = PHQ_B1M_long, REML = TRUE)
summary(PHQ_MEM_B1M)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PHQ_Score ~ Group * Time + (1 | ID)
## Data: PHQ_B1M_long
##
## REML criterion at convergence: 3028.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.64448 -0.55044 -0.09744 0.49965 2.79846
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 21.46 4.633
## Residual 15.15 3.892
## Number of obs: 487, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 9.9600 0.8557 367.8141 11.640
## GroupB_Controls -0.5166 1.0381 367.8141 -0.498
## GroupC_Intervention 0.7196 1.0429 367.8141 0.690
## TimeD_M1_PHQ_total 0.6244 0.8271 240.0648 0.755
## GroupB_Controls:TimeD_M1_PHQ_total -1.8086 0.9995 239.3565 -1.810
## GroupC_Intervention:TimeD_M1_PHQ_total -2.9746 1.0045 239.4295 -2.961
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## GroupB_Controls 0.61902
## GroupC_Intervention 0.49062
## TimeD_M1_PHQ_total 0.45104
## GroupB_Controls:TimeD_M1_PHQ_total 0.07161 .
## GroupC_Intervention:TimeD_M1_PHQ_total 0.00337 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TD_M1_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmD_M1_PHQ_ -0.428 0.353 0.351
## GB_C:TD_M1_ 0.354 -0.430 -0.291 -0.828
## GC_I:TD_M1_ 0.352 -0.291 -0.430 -0.823 0.681
anova (PHQ_MEM_B1M)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 35.957 17.979 2 258.66 1.1869 0.30684
## Time 96.897 96.897 1 239.05 6.3966 0.01208 *
## Group:Time 134.059 67.029 2 238.81 4.4250 0.01297 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(PHQ_MEM_B1M)
## # R2 for Mixed Models
##
## Conditional R2: 0.597
## Marginal R2: 0.026
parameters::standardise_parameters(PHQ_MEM_B1M)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ----------------------------------------------------------------------------
## (Intercept) | 0.09 | [-0.18, 0.37]
## Group [B_Controls] | -0.08 | [-0.42, 0.25]
## Group [C_Intervention] | 0.12 | [-0.22, 0.45]
## Time [D_M1_PHQ_total] | 0.10 | [-0.16, 0.37]
## Group [B_Controls] × Time [D_M1_PHQ_total] | -0.30 | [-0.62, 0.03]
## Group [C_Intervention] × Time [D_M1_PHQ_total] | -0.49 | [-0.81, -0.16]
# BF
full_lmer <- lmer(PHQ_Score ~ Group + Time + (1|ID), data = PHQ_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.02448161
full_lmer <- lmer(PHQ_Score ~ Group + Time + (1|ID), data = PHQ_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 22.08378
full_lmer <- lmer(PHQ_Score ~ Group * Time + (1|ID), data = PHQ_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.7440856
PHQ_B3m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_PHQ_total", "E_M3_PHQ_total")
PHQ_B3m_long <- PHQ_B3m %>%
pivot_longer(cols = c(A_PRE_PHQ_total, E_M3_PHQ_total),
names_to = "Time",
values_to = "PHQ_Score")
PHQ_MEM_B3m <- lmer(PHQ_Score ~ Group * Time + (1|ID), data = PHQ_B3m_long, REML = TRUE)
summary(PHQ_MEM_B3m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PHQ_Score ~ Group * Time + (1 | ID)
## Data: PHQ_B3m_long
##
## REML criterion at convergence: 2987.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.06637 -0.62991 -0.07164 0.54186 2.75015
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 17.98 4.240
## Residual 17.57 4.192
## Number of obs: 478, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 9.9600 0.8433 384.0474 11.811
## GroupB_Controls -0.5166 1.0230 384.0474 -0.505
## GroupC_Intervention 0.7196 1.0278 384.0474 0.700
## TimeE_M3_PHQ_total 0.4215 0.9232 238.6773 0.457
## GroupB_Controls:TimeE_M3_PHQ_total -0.9776 1.0987 234.7711 -0.890
## GroupC_Intervention:TimeE_M3_PHQ_total -1.7938 1.1205 237.8329 -1.601
## Pr(>|t|)
## (Intercept) <2e-16 ***
## GroupB_Controls 0.614
## GroupC_Intervention 0.484
## TimeE_M3_PHQ_total 0.648
## GroupB_Controls:TimeE_M3_PHQ_total 0.374
## GroupC_Intervention:TimeE_M3_PHQ_total 0.111
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TE_M3_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmE_M3_PHQ_ -0.452 0.372 0.370
## GB_C:TE_M3_ 0.379 -0.460 -0.311 -0.840
## GC_I:TE_M3_ 0.372 -0.307 -0.453 -0.824 0.692
anova (PHQ_MEM_B3m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 31.683 15.842 2 257.71 0.9014 0.4073
## Time 24.788 24.788 1 235.09 1.4104 0.2362
## Group:Time 46.655 23.328 2 234.10 1.3273 0.2672
performance::r2(PHQ_MEM_B3m)
## # R2 for Mixed Models
##
## Conditional R2: 0.512
## Marginal R2: 0.012
parameters::standardise_parameters(PHQ_MEM_B3m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------------------------------
## (Intercept) | 0.04 | [-0.23, 0.32]
## Group [B_Controls] | -0.09 | [-0.42, 0.25]
## Group [C_Intervention] | 0.12 | [-0.22, 0.46]
## Time [E_M3_PHQ_total] | 0.07 | [-0.23, 0.37]
## Group [B_Controls] × Time [E_M3_PHQ_total] | -0.16 | [-0.53, 0.20]
## Group [C_Intervention] × Time [E_M3_PHQ_total] | -0.30 | [-0.67, 0.07]
# BF
full_lmer <- lmer(PHQ_Score ~ Group + Time + (1|ID), data = PHQ_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.01976783
full_lmer <- lmer(PHQ_Score ~ Group + Time + (1|ID), data = PHQ_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.20935
full_lmer <- lmer(PHQ_Score ~ Group * Time + (1|ID), data = PHQ_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.04378711
# Intervention
PHQ_I_1m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_PHQ_total", "D_M1_PHQ_total") %>%
filter(Group == "C_Intervention")
PHQ_I_long_1m <- PHQ_I_1m %>%
pivot_longer(cols = c("A_PRE_PHQ_total", "D_M1_PHQ_total"),
names_to = "Time",
values_to = "PHQ_Score")
PHQ_MEM_I_1m <- lmer(PHQ_Score ~ Time + (1|ID), data = PHQ_I_long_1m, REML = TRUE)
summary(PHQ_MEM_I_1m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PHQ_Score ~ Time + (1 | ID)
## Data: PHQ_I_long_1m
##
## REML criterion at convergence: 1192.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.30041 -0.55128 -0.08312 0.51684 2.64008
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 20.39 4.516
## Residual 13.80 3.714
## Number of obs: 194, groups: ID, 103
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 10.6796 0.5761 145.9837 18.54 < 2e-16 ***
## TimeD_M1_PHQ_total -2.3508 0.5441 95.7256 -4.32 3.81e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmD_M1_PHQ_ -0.427
anova (PHQ_MEM_I_1m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 257.49 257.49 1 95.726 18.663 3.811e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(PHQ_MEM_I_1m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------
## (Intercept) | 0.18 | [-0.01, 0.37]
## Time [D_M1_PHQ_total] | -0.39 | [-0.57, -0.21]
# Psychoeducation
PHQ_C_1m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_PHQ_total", "D_M1_PHQ_total") %>%
filter(Group == "B_Controls")
PHQ_C_long_1m <- PHQ_C_1m %>%
pivot_longer(cols = c("A_PRE_PHQ_total", "D_M1_PHQ_total"),
names_to = "Time",
values_to = "PHQ_Score")
PHQ_MEM_C_1m <- lmer(PHQ_Score ~ Time + (1|ID), data = PHQ_C_long_1m, REML = TRUE)
summary(PHQ_MEM_C_1m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PHQ_Score ~ Time + (1 | ID)
## Data: PHQ_C_long_1m
##
## REML criterion at convergence: 1265.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.3651 -0.6137 -0.1412 0.5123 2.5367
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 19.77 4.447
## Residual 18.70 4.325
## Number of obs: 200, groups: ID, 106
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 9.4434 0.6025 159.5745 15.675 <2e-16 ***
## TimeD_M1_PHQ_total -1.1978 0.6221 98.5457 -1.926 0.057 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmD_M1_PHQ_ -0.471
anova (PHQ_MEM_C_1m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 69.341 69.341 1 98.546 3.7077 0.05704 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(PHQ_MEM_C_1m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------
## (Intercept) | 0.10 | [-0.09, 0.29]
## Time [D_M1_PHQ_total] | -0.19 | [-0.39, 0.00]
# No-Training
PHQ_EC_1m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_PHQ_total", "D_M1_PHQ_total") %>%
filter(Group == "A_ECs")
PHQ_EC_long_1m <- PHQ_EC_1m %>%
pivot_longer(cols = c(A_PRE_PHQ_total, D_M1_PHQ_total),
names_to = "Time",
values_to = "PHQ_Score")
PHQ_MEM_EC_1m <- lmer(PHQ_Score ~ Time + (1|ID), data = PHQ_EC_long_1m, REML = TRUE)
summary(PHQ_MEM_EC_1m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PHQ_Score ~ Time + (1 | ID)
## Data: PHQ_EC_long_1m
##
## REML criterion at convergence: 564.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.8858 -0.4652 -0.1043 0.5389 1.7733
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 27.42 5.236
## Residual 10.19 3.192
## Number of obs: 93, groups: ID, 50
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 9.9600 0.8673 62.0927 11.48 <2e-16 ***
## TimeD_M1_PHQ_total 0.6818 0.6819 43.8551 1.00 0.323
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmD_M1_PHQ_ -0.345
anova (PHQ_MEM_EC_1m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 10.188 10.188 1 43.855 0.9999 0.3228
parameters::standardise_parameters(PHQ_MEM_EC_1m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------
## (Intercept) | -0.03 | [-0.31, 0.25]
## Time [D_M1_PHQ_total] | 0.11 | [-0.11, 0.33]
# BF
full_lmer <- lmer(PHQ_Score ~ Time + (1|ID), data = PHQ_I_long_1m, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 527.3174
full_lmer <- lmer(PHQ_Score ~ Time + (1|ID), data = PHQ_C_long_1m, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.6946523
full_lmer <- lmer(PHQ_Score ~ Time + (1|ID), data = PHQ_EC_long_1m, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.2919433
m.ef_phq_1m <- emmeans(PHQ_MEM_B1M, "Time", "Group")
eff_size(m.ef_phq_1m, sigma = sigma(PHQ_MEM_B1M), edf = df.residual(PHQ_MEM_B1M))
## Group = A_ECs:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_PHQ_total - D_M1_PHQ_total -0.160 0.213 366 -0.5786 0.258
##
## Group = B_Controls:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_PHQ_total - D_M1_PHQ_total 0.304 0.145 366 0.0201 0.588
##
## Group = C_Intervention:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_PHQ_total - D_M1_PHQ_total 0.604 0.148 366 0.3132 0.894
##
## sigma used for effect sizes: 3.892
## Degrees-of-freedom method: inherited from kenward-roger when re-gridding
## Confidence level used: 0.95
Mediation.PHQchange.1W <-
'#regressions
PHQ_B1W_change ~ c1 * Group
IUS_B1W_change ~ a1 * Group
PHQ_B1W_change ~ b1*IUS_B1W_change
indirect1 := a1 * b1
direct := c1
total := c1 + (a1 * b1)
'
group.IUS.PHQ.1W <- lavaan::sem(Mediation.PHQchange.1W, data=Full_data, std.lv=T, std.ov=T, missing='fiml', se='robust', estimator='mlr', auto.var = T)
summary(group.IUS.PHQ.1W, standardized=T, rsquare=T, ci = T)
## lavaan 0.6-19 ended normally after 15 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 7
##
## Number of observations 259
## Number of missing patterns 3
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 0.000 0.000
## Degrees of freedom 0 0
##
## Parameter Estimates:
##
## Standard errors Sandwich
## Information bread Observed
## Observed information based on Hessian
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## PHQ_B1W_change ~
## Group (c1) -0.096 0.086 -1.108 0.268 -0.265 0.074
## IUS_B1W_change ~
## Group (a1) -0.374 0.076 -4.913 0.000 -0.523 -0.225
## PHQ_B1W_change ~
## IUS_B1W_c (b1) 0.128 0.076 1.686 0.092 -0.021 0.277
## Std.lv Std.all
##
## -0.096 -0.071
##
## -0.374 -0.278
##
## 0.128 0.128
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .PHQ_B1W_change 0.211 0.190 1.109 0.268 -0.162 0.583
## .IUS_B1W_change 0.826 0.161 5.135 0.000 0.510 1.141
## Std.lv Std.all
## 0.211 0.211
## 0.826 0.827
##
## Variances:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .PHQ_B1W_change 0.970 0.124 7.850 0.000 0.728 1.212
## .IUS_B1W_change 0.920 0.116 7.943 0.000 0.693 1.147
## Std.lv Std.all
## 0.970 0.974
## 0.920 0.923
##
## R-Square:
## Estimate
## PHQ_B1W_change 0.026
## IUS_B1W_change 0.077
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## indirect1 -0.048 0.029 -1.665 0.096 -0.104 0.008
## direct -0.096 0.086 -1.108 0.268 -0.265 0.074
## total -0.144 0.082 -1.754 0.079 -0.304 0.017
## Std.lv Std.all
## -0.048 -0.036
## -0.096 -0.071
## -0.144 -0.107
Mediation.PHQchange.1M <-
'#regressions
PHQ_B1M_change ~ c1 * Group
IUS_B1M_change ~ a1 * Group
PHQ_B1M_change ~ b1*IUS_B1M_change
indirect1 := a1 * b1
direct := c1
total := c1 + (a1 * b1)
'
group.IUS.PHQ.1M <- lavaan::sem(Mediation.PHQchange.1M, data=Full_data, std.lv=T, std.ov=T, missing='fiml', se='robust', estimator='mlr', auto.var = T)
summary(group.IUS.PHQ.1M, standardized=T, rsquare=T, ci = T)
## lavaan 0.6-19 ended normally after 16 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 7
##
## Number of observations 259
## Number of missing patterns 4
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 0.000 0.000
## Degrees of freedom 0 0
##
## Parameter Estimates:
##
## Standard errors Sandwich
## Information bread Observed
## Observed information based on Hessian
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## PHQ_B1M_change ~
## Group (c1) -0.174 0.087 -1.994 0.046 -0.345 -0.003
## IUS_B1M_change ~
## Group (a1) -0.413 0.076 -5.465 0.000 -0.562 -0.265
## PHQ_B1M_change ~
## IUS_B1M_c (b1) 0.237 0.087 2.717 0.007 0.066 0.407
## Std.lv Std.all
##
## -0.174 -0.129
##
## -0.413 -0.307
##
## 0.237 0.236
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .PHQ_B1M_change 0.383 0.196 1.950 0.051 -0.002 0.768
## .IUS_B1M_change 0.911 0.163 5.574 0.000 0.591 1.231
## Std.lv Std.all
## 0.383 0.383
## 0.911 0.913
##
## Variances:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .PHQ_B1M_change 0.907 0.104 8.708 0.000 0.703 1.111
## .IUS_B1M_change 0.901 0.101 8.897 0.000 0.703 1.100
## Std.lv Std.all
## 0.907 0.909
## 0.901 0.906
##
## R-Square:
## Estimate
## PHQ_B1M_change 0.091
## IUS_B1M_change 0.094
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## indirect1 -0.098 0.040 -2.426 0.015 -0.177 -0.019
## direct -0.174 0.087 -1.994 0.046 -0.345 -0.003
## total -0.272 0.078 -3.464 0.001 -0.425 -0.118
## Std.lv Std.all
## -0.098 -0.073
## -0.174 -0.129
## -0.272 -0.202
Mediation.PHQchange.3M <-
'#regressions
PHQ_B3M_change ~ c1 * Group
IUS_B3M_change ~ a1 * Group
PHQ_B3M_change ~ b1*IUS_B3M_change
indirect1 := a1 * b1
direct := c1
total := c1 + (a1 * b1)
'
group.IUS.PHQ.3M <- lavaan::sem(Mediation.PHQchange.3M, data=Full_data, std.lv=T, std.ov=T, missing='fiml', se='robust', estimator='mlr', auto.var = T)
summary(group.IUS.PHQ.3M, standardized=T, rsquare=T, ci = T)
## lavaan 0.6-19 ended normally after 15 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 7
##
## Number of observations 259
## Number of missing patterns 4
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 0.000 0.000
## Degrees of freedom 0 0
##
## Parameter Estimates:
##
## Standard errors Sandwich
## Information bread Observed
## Observed information based on Hessian
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## PHQ_B3M_change ~
## Group (c1) -0.108 0.085 -1.268 0.205 -0.274 0.059
## IUS_B3M_change ~
## Group (a1) -0.260 0.082 -3.182 0.001 -0.421 -0.100
## PHQ_B3M_change ~
## IUS_B3M_c (b1) 0.318 0.085 3.756 0.000 0.152 0.483
## Std.lv Std.all
##
## -0.108 -0.080
##
## -0.260 -0.193
##
## 0.318 0.318
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .PHQ_B3M_change 0.236 0.182 1.300 0.194 -0.120 0.592
## .IUS_B3M_change 0.569 0.183 3.115 0.002 0.211 0.928
## Std.lv Std.all
## 0.236 0.237
## 0.569 0.570
##
## Variances:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .PHQ_B3M_change 0.879 0.091 9.703 0.000 0.702 1.057
## .IUS_B3M_change 0.960 0.125 7.689 0.000 0.716 1.205
## Std.lv Std.all
## 0.879 0.883
## 0.960 0.963
##
## R-Square:
## Estimate
## PHQ_B3M_change 0.117
## IUS_B3M_change 0.037
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## indirect1 -0.083 0.038 -2.204 0.028 -0.156 -0.009
## direct -0.108 0.085 -1.268 0.205 -0.274 0.059
## total -0.190 0.087 -2.185 0.029 -0.361 -0.020
## Std.lv Std.all
## -0.083 -0.061
## -0.108 -0.080
## -0.190 -0.141
Mood_alltimepoints <- Full_data %>%
dplyr::select("A_PRE_negaff", "B_POST_negaff", "C_W1_negaff", "D_M1_negaff", "E_M3_negaff", "Group") %>%
pivot_longer(cols = c(A_PRE_negaff, B_POST_negaff, C_W1_negaff, D_M1_negaff, E_M3_negaff),
names_to = "Time",
values_to = "Mood_Score")
b <- Mood_alltimepoints %>%
mutate(Time=case_when(
Time == "A_PRE_negaff" ~ "Baseline",
Time == "B_POST_negaff" ~ "Post",
Time == "C_W1_negaff" ~ "1 Week",
Time == "D_M1_negaff" ~ "1 Month",
Time == "E_M3_negaff" ~ "3 Months"
)) %>%
mutate(Time=factor(Time, levels=c("Baseline", "Post", "1 Week", "1 Month", "3 Months"))) %>%
mutate(Group=case_when(
Group == "A_ECs" ~ "\nNo-Training\nControl",
Group == "B_Controls" ~ "\nPsychoeducation\nControl",
Group == "C_Intervention" ~ "\nUncertainty-Mindsets\nTraining")) %>%
mutate(Group=factor(Group, levels=c("\nNo-Training\nControl", "\nPsychoeducation\nControl", "\nUncertainty-Mindsets\nTraining"))) %>%
ggplot(aes(x = Time, y = Mood_Score, color = Group, fill = Group, group = Group)) +
#stat_summary(fun = mean, geom = "line") + # Calculate and plot the mean as a line
stat_summary(fun = mean, geom = "point") + # Add points at the mean values
scale_y_continuous(name = "Negative Affect") +
theme_bw() +
theme(legend.position = "none") +
geom_smooth(se = TRUE, level = 0.95, alpha = 0.25)
Mood_gg <- ggMarginal(b,groupColour = TRUE, groupFill = TRUE, type = "density")
## Warning: Removed 81 rows containing non-finite outside the scale range
## (`stat_summary()`).
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning: Removed 81 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Removed 81 rows containing non-finite outside the scale range
## (`stat_summary()`).
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning: Removed 81 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x < range[1], value =
## "Baseline"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x > range[2], value =
## "Post"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x < range[1], value =
## "Baseline"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x > range[2], value =
## "Post"): NAs introduced by coercion
## Warning: Removed 15 rows containing non-finite outside the scale range
## (`stat_density()`).
## Removed 15 rows containing non-finite outside the scale range
## (`stat_density()`).
## Warning: No shared levels found between `names(values)` of the manual scale and the
## data's colour values.
## Warning: No shared levels found between `names(values)` of the manual scale and the
## data's fill values.
Mood_gg
negaff_BP <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_negaff", "B_POST_negaff")
negaff_BP_long <- negaff_BP %>%
pivot_longer(cols = c(A_PRE_negaff, B_POST_negaff),
names_to = "Time",
values_to = "Mood_Score")
negaff_MEM_BP <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_BP_long, REML = TRUE)
summary(negaff_MEM_BP)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Group * Time + (1 | ID)
## Data: negaff_BP_long
##
## REML criterion at convergence: 5079
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.3781 -0.4451 -0.0476 0.3855 4.1547
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 1035.6 32.18
## Residual 513.4 22.66
## Number of obs: 517, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) -40.300 5.566 353.535 -7.240
## GroupB_Controls 2.984 6.752 353.535 0.442
## GroupC_Intervention 10.669 6.784 353.535 1.573
## TimeB_POST_negaff 0.020 4.532 255.115 0.004
## GroupB_Controls:TimeB_POST_negaff -19.992 5.498 255.115 -3.637
## GroupC_Intervention:TimeB_POST_negaff -29.341 5.530 255.341 -5.305
## Pr(>|t|)
## (Intercept) 2.81e-12 ***
## GroupB_Controls 0.658816
## GroupC_Intervention 0.116674
## TimeB_POST_negaff 0.996482
## GroupB_Controls:TimeB_POST_negaff 0.000334 ***
## GroupC_Intervention:TimeB_POST_negaff 2.44e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TB_POS GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmB_POST_ng -0.407 0.336 0.334
## GB_C:TB_POS 0.336 -0.407 -0.275 -0.824
## GC_I:TB_POS 0.334 -0.275 -0.407 -0.819 0.675
anova (negaff_MEM_BP)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 677.9 339.0 2 255.99 0.6603 0.5176
## Time 30949.7 30949.7 1 255.29 60.2843 1.989e-13 ***
## Group:Time 14453.2 7226.6 2 255.32 14.0761 1.588e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_BP)
## # R2 for Mixed Models
##
## Conditional R2: 0.695
## Marginal R2: 0.079
parameters::standardise_parameters(negaff_MEM_BP)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------------------------------
## (Intercept) | 0.11 | [-0.16, 0.38]
## Group [B_Controls] | 0.07 | [-0.25, 0.40]
## Group [C_Intervention] | 0.26 | [-0.07, 0.59]
## Time [B_POST_negaff] | 4.90e-04 | [-0.22, 0.22]
## Group [B_Controls] × Time [B_POST_negaff] | -0.49 | [-0.75, -0.23]
## Group [C_Intervention] × Time [B_POST_negaff] | -0.72 | [-0.98, -0.45]
# BF
full_lmer <- lmer(Mood_Score ~ Group + Time + (1|ID), data = negaff_BP_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.6630184
full_lmer <- lmer(Mood_Score ~ Group + Time + (1|ID), data = negaff_BP_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 1.191482e+16
full_lmer <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_BP_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 188288.2
negaff_B1W <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_negaff", "C_W1_negaff")
negaff_B1W_long <- negaff_B1W %>%
pivot_longer(cols = c(A_PRE_negaff, C_W1_negaff),
names_to = "Time",
values_to = "Mood_Score")
negaff_MEM_B1W <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1W_long, REML = TRUE)
summary(negaff_MEM_B1W)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Group * Time + (1 | ID)
## Data: negaff_B1W_long
##
## REML criterion at convergence: 5220.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.4716 -0.5899 -0.1159 0.4429 3.1570
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 866.2 29.43
## Residual 1117.7 33.43
## Number of obs: 509, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) -40.300 6.299 424.920 -6.398
## GroupB_Controls 2.984 7.641 424.920 0.390
## GroupC_Intervention 10.669 7.677 424.920 1.390
## TimeC_W1_negaff 14.705 6.786 253.748 2.167
## GroupB_Controls:TimeC_W1_negaff -8.265 8.220 253.359 -1.005
## GroupC_Intervention:TimeC_W1_negaff -9.377 8.269 253.708 -1.134
## Pr(>|t|)
## (Intercept) 4.16e-10 ***
## GroupB_Controls 0.6964
## GroupC_Intervention 0.1653
## TimeC_W1_negaff 0.0312 *
## GroupB_Controls:TimeC_W1_negaff 0.3157
## GroupC_Intervention:TimeC_W1_negaff 0.2579
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TC_W1_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmC_W1_ngff -0.523 0.431 0.429
## GB_C:TC_W1_ 0.432 -0.524 -0.354 -0.825
## GC_I:TC_W1_ 0.429 -0.354 -0.523 -0.821 0.677
anova (negaff_MEM_B1W)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 2236.2 1118.1 2 257.40 1.0004 0.36916
## Time 8711.4 8711.4 1 253.43 7.7944 0.00564 **
## Group:Time 1553.5 776.7 2 253.35 0.6950 0.50003
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_B1W)
## # R2 for Mixed Models
##
## Conditional R2: 0.445
## Marginal R2: 0.014
parameters::standardise_parameters(negaff_MEM_B1W)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ------------------------------------------------------------------------
## (Intercept) | -0.20 | [-0.48, 0.07]
## Group [B_Controls] | 0.07 | [-0.27, 0.40]
## Group [C_Intervention] | 0.24 | [-0.10, 0.58]
## Time [C_W1_negaff] | 0.33 | [ 0.03, 0.63]
## Group [B_Controls] × Time [C_W1_negaff] | -0.19 | [-0.55, 0.18]
## Group [C_Intervention] × Time [C_W1_negaff] | -0.21 | [-0.57, 0.15]
# BF
full_lmer <- lmer(Mood_Score ~ Group + Time + (1|ID), data = negaff_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 1.067573
full_lmer <- lmer(Mood_Score ~ Group + Time + (1|ID), data = negaff_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 8.340361
full_lmer <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 1.236243
negaff_B1M <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_negaff", "D_M1_negaff")
negaff_B1M_long <- negaff_B1M %>%
pivot_longer(cols = c(A_PRE_negaff, D_M1_negaff),
names_to = "Time",
values_to = "Mood_Score")
negaff_MEM_B1M <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1M_long, REML = TRUE)
summary(negaff_MEM_B1M)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Group * Time + (1 | ID)
## Data: negaff_B1M_long
##
## REML criterion at convergence: 5011.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.42299 -0.59296 -0.07265 0.51813 2.91923
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 893.6 29.89
## Residual 1156.5 34.01
## Number of obs: 487, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) -40.300 6.403 411.735 -6.294
## GroupB_Controls 2.984 7.768 411.735 0.384
## GroupC_Intervention 10.669 7.804 411.735 1.367
## TimeD_M1_negaff 20.875 7.188 246.670 2.904
## GroupB_Controls:TimeD_M1_negaff -14.198 8.688 245.758 -1.634
## GroupC_Intervention:TimeD_M1_negaff -14.331 8.732 245.852 -1.641
## Pr(>|t|)
## (Intercept) 7.95e-10 ***
## GroupB_Controls 0.70108
## GroupC_Intervention 0.17236
## TimeD_M1_negaff 0.00402 **
## GroupB_Controls:TimeD_M1_negaff 0.10351
## GroupC_Intervention:TimeD_M1_negaff 0.10205
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TD_M1_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmD_M1_ngff -0.503 0.414 0.412
## GB_C:TD_M1_ 0.416 -0.504 -0.341 -0.827
## GC_I:TD_M1_ 0.414 -0.341 -0.504 -0.823 0.681
anova (negaff_MEM_B1M)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 2302.4 1151.2 2 260.11 0.9954 0.3709746
## Time 13435.3 13435.3 1 245.36 11.6170 0.0007637 ***
## Group:Time 3690.3 1845.2 2 245.06 1.5954 0.2049198
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_B1M)
## # R2 for Mixed Models
##
## Conditional R2: 0.447
## Marginal R2: 0.020
parameters::standardise_parameters(negaff_MEM_B1M)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ------------------------------------------------------------------------
## (Intercept) | -0.22 | [-0.49, 0.06]
## Group [B_Controls] | 0.07 | [-0.27, 0.40]
## Group [C_Intervention] | 0.23 | [-0.10, 0.57]
## Time [D_M1_negaff] | 0.46 | [ 0.15, 0.77]
## Group [B_Controls] × Time [D_M1_negaff] | -0.31 | [-0.69, 0.06]
## Group [C_Intervention] × Time [D_M1_negaff] | -0.31 | [-0.69, 0.06]
# BF
full_lmer <- lmer(Mood_Score ~ Group + Time + (1|ID), data = negaff_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 1.166049
full_lmer <- lmer(Mood_Score ~ Group + Time + (1|ID), data = negaff_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 27.46842
full_lmer <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 3.5266
negaff_B3M <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_negaff", "E_M3_negaff")
negaff_B3M_long <- negaff_B3M %>%
pivot_longer(cols = c(A_PRE_negaff, E_M3_negaff),
names_to = "Time",
values_to = "Mood_Score")
negaff_MEM_B3m <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B3M_long, REML = TRUE)
summary(negaff_MEM_B3m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Group * Time + (1 | ID)
## Data: negaff_B3M_long
##
## REML criterion at convergence: 4928.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.33863 -0.63216 -0.06267 0.50448 2.85349
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 818.2 28.60
## Residual 1236.4 35.16
## Number of obs: 478, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) -40.300 6.410 413.164 -6.287
## GroupB_Controls 2.984 7.777 413.164 0.384
## GroupC_Intervention 10.669 7.813 413.164 1.366
## TimeE_M3_negaff 25.171 7.695 243.763 3.271
## GroupB_Controls:TimeE_M3_negaff -17.604 9.168 239.150 -1.920
## GroupC_Intervention:TimeE_M3_negaff -21.413 9.341 242.763 -2.292
## Pr(>|t|)
## (Intercept) 8.25e-10 ***
## GroupB_Controls 0.70139
## GroupC_Intervention 0.17282
## TimeE_M3_negaff 0.00123 **
## GroupB_Controls:TimeE_M3_negaff 0.05602 .
## GroupC_Intervention:TimeE_M3_negaff 0.02274 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TE_M3_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmE_M3_ngff -0.501 0.413 0.411
## GB_C:TE_M3_ 0.421 -0.510 -0.345 -0.839
## GC_I:TE_M3_ 0.413 -0.340 -0.503 -0.824 0.691
anova (negaff_MEM_B3m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 1726.1 863.1 2 257.32 0.6980 0.4984945
## Time 14690.1 14690.1 1 239.53 11.8815 0.0006695 ***
## Group:Time 6763.4 3381.7 2 238.37 2.7352 0.0669207 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_B3m)
## # R2 for Mixed Models
##
## Conditional R2: 0.411
## Marginal R2: 0.021
parameters::standardise_parameters(negaff_MEM_B3m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -------------------------------------------------------------------------
## (Intercept) | -0.21 | [-0.48, 0.07]
## Group [B_Controls] | 0.07 | [-0.27, 0.40]
## Group [C_Intervention] | 0.23 | [-0.10, 0.57]
## Time [E_M3_negaff] | 0.55 | [ 0.22, 0.89]
## Group [B_Controls] × Time [E_M3_negaff] | -0.39 | [-0.78, 0.01]
## Group [C_Intervention] × Time [E_M3_negaff] | -0.47 | [-0.87, -0.07]
# BF
full_lmer <- lmer(Mood_Score ~ Group + Time + (1|ID), data = negaff_B3M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.8570475
full_lmer <- lmer(Mood_Score ~ Group + Time + (1|ID), data = negaff_B3M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 18.17745
full_lmer <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B3M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 12.27709
# Intervention
negaff_BP_long_I <- negaff_BP_long %>%
filter(Group == "C_Intervention")
negaff_MEM_BP_I <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_BP_long_I, REML = TRUE)
summary(negaff_MEM_BP_I)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Time + (1 | ID)
## Data: negaff_BP_long_I
##
## REML criterion at convergence: 2028.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.9125 -0.4369 -0.0183 0.4338 3.8624
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 857.1 29.28
## Residual 634.9 25.20
## Number of obs: 205, groups: ID, 103
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -29.631 3.806 152.951 -7.785 9.74e-13 ***
## TimeB_POST_negaff -29.291 3.525 101.473 -8.310 4.45e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmB_POST_ng -0.459
anova (negaff_MEM_BP_I)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 43848 43848 1 101.47 69.063 4.453e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_BP_I)
## # R2 for Mixed Models
##
## Conditional R2: 0.628
## Marginal R2: 0.126
parameters::standardise_parameters(negaff_MEM_BP_I)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------
## (Intercept) | 0.35 | [ 0.17, 0.53]
## Time [B_POST_negaff] | -0.71 | [-0.88, -0.54]
# Psychoed
negaff_BP_long_P <- negaff_BP_long %>%
filter(Group == "B_Controls")
negaff_MEM_BP_P <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_BP_long_P, REML = TRUE)
summary(negaff_MEM_BP_P)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Time + (1 | ID)
## Data: negaff_BP_long_P
##
## REML criterion at convergence: 2090.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.6806 -0.4271 -0.0440 0.3844 3.4206
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 1038.6 32.23
## Residual 534.3 23.11
## Number of obs: 212, groups: ID, 106
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -37.316 3.852 146.239 -9.687 < 2e-16 ***
## TimeB_POST_negaff -19.972 3.175 105.000 -6.290 7.42e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmB_POST_ng -0.412
anova (negaff_MEM_BP_P)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 21140 21140 1 105 39.567 7.418e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_BP_P)
## # R2 for Mixed Models
##
## Conditional R2: 0.681
## Marginal R2: 0.060
parameters::standardise_parameters(negaff_MEM_BP_P)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------
## (Intercept) | 0.24 | [ 0.06, 0.43]
## Time [B_POST_negaff] | -0.49 | [-0.64, -0.34]
# No-Training
negaff_BP_long_ECs <- negaff_BP_long %>%
filter(Group == "A_ECs")
negaff_MEM_BP_ECs <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_BP_long_ECs, REML = TRUE)
summary(negaff_MEM_BP_ECs)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Time + (1 | ID)
## Data: negaff_BP_long_ECs
##
## REML criterion at convergence: 942.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.97125 -0.39213 -0.05732 0.44027 2.09159
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 1398.7 37.40
## Residual 217.9 14.76
## Number of obs: 100, groups: ID, 50
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -40.300 5.686 56.047 -7.087 2.47e-09 ***
## TimeB_POST_negaff 0.020 2.953 49.000 0.007 0.995
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmB_POST_ng -0.260
anova (negaff_MEM_BP_ECs)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 0.01 0.01 1 49 0 0.9946
performance::r2(negaff_MEM_BP_ECs)
## # R2 for Mixed Models
##
## Conditional R2: 0.865
## Marginal R2: 0.000
parameters::standardise_parameters(negaff_MEM_BP_ECs)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -------------------------------------------------
## (Intercept) | -2.50e-04 | [-0.28, 0.28]
## Time [B_POST_negaff] | 5.00e-04 | [-0.15, 0.15]
# BF
full_lmer <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_BP_long_I, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 201553757620
full_lmer <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_BP_long_P, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 12511024
full_lmer <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_BP_long_ECs, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.7363876
cohens_d <-emmeans(negaff_MEM_BP, "Time", "Group")
eff_size(cohens_d, sigma = sigma(negaff_MEM_BP), edf = df.residual(negaff_MEM_BP))
## Group = A_ECs:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_negaff - B_POST_negaff -0.000883 0.200 353 -0.394 0.392
##
## Group = B_Controls:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_negaff - B_POST_negaff 0.881432 0.140 353 0.606 1.157
##
## Group = C_Intervention:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_negaff - B_POST_negaff 1.294067 0.146 353 1.008 1.581
##
## sigma used for effect sizes: 22.66
## Degrees-of-freedom method: inherited from kenward-roger when re-gridding
## Confidence level used: 0.95
# Intervention
negaff_B1W_long_I <- negaff_B1W_long %>%
filter(Group == "C_Intervention")
negaff_MEM_B1W_I <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B1W_long_I, REML = TRUE)
summary(negaff_MEM_B1W_I)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Time + (1 | ID)
## Data: negaff_B1W_long_I
##
## REML criterion at convergence: 2074
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.5183 -0.5146 -0.0585 0.4192 3.1822
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 907.5 30.13
## Residual 1089.5 33.01
## Number of obs: 202, groups: ID, 103
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -29.631 4.403 166.808 -6.729 2.61e-10 ***
## TimeC_W1_negaff 5.339 4.667 100.486 1.144 0.255
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmC_W1_ngff -0.515
anova (negaff_MEM_B1W_I)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 1426.2 1426.2 1 100.49 1.309 0.2553
performance::r2(negaff_MEM_B1W_I)
## # R2 for Mixed Models
##
## Conditional R2: 0.456
## Marginal R2: 0.004
parameters::standardise_parameters(negaff_MEM_B1W_I)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -----------------------------------------------
## (Intercept) | -0.06 | [-0.25, 0.14]
## Time [C_W1_negaff] | 0.12 | [-0.09, 0.33]
# Psychoeducation
negaff_B1W_long_P <- negaff_B1W_long %>%
filter(Group == "B_Controls")
negaff_MEM_B1W_P <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B1W_long_P, REML = TRUE)
summary(negaff_MEM_B1W_P)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Time + (1 | ID)
## Data: negaff_B1W_long_P
##
## REML criterion at convergence: 2165.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.3296 -0.5909 -0.1218 0.4999 2.8245
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 916.3 30.27
## Residual 1239.3 35.20
## Number of obs: 209, groups: ID, 106
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -37.316 4.510 176.057 -8.275 3.08e-14 ***
## TimeC_W1_negaff 6.441 4.885 103.999 1.318 0.19
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmC_W1_ngff -0.531
anova (negaff_MEM_B1W_P)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 2154.1 2154.1 1 104 1.7382 0.1903
performance::r2(negaff_MEM_B1W_P)
## # R2 for Mixed Models
##
## Conditional R2: 0.428
## Marginal R2: 0.005
parameters::standardise_parameters(negaff_MEM_B1W_P)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -----------------------------------------------
## (Intercept) | -0.07 | [-0.26, 0.12]
## Time [C_W1_negaff] | 0.14 | [-0.07, 0.35]
# No-Training
negaff_B1W_long_ECs <- negaff_B1W_long %>%
filter(Group == "A_ECs")
negaff_MEM_B1W_ECs <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B1W_long_ECs, REML = TRUE)
summary(negaff_MEM_B1W_ECs)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Time + (1 | ID)
## Data: negaff_B1W_long_ECs
##
## REML criterion at convergence: 978.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.6154 -0.6748 -0.1937 0.4830 1.8634
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 673.6 25.95
## Residual 912.9 30.21
## Number of obs: 98, groups: ID, 50
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -40.300 5.633 82.049 -7.154 3.21e-10 ***
## TimeC_W1_negaff 14.704 6.132 48.765 2.398 0.0204 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmC_W1_ngff -0.529
anova (negaff_MEM_B1W_ECs)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 5249.4 5249.4 1 48.765 5.7502 0.02036 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_B1W_ECs)
## # R2 for Mixed Models
##
## Conditional R2: 0.444
## Marginal R2: 0.033
parameters::standardise_parameters(negaff_MEM_B1W_ECs)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -----------------------------------------------
## (Intercept) | -0.18 | [-0.46, 0.10]
## Time [C_W1_negaff] | 0.36 | [ 0.06, 0.67]
# BF
full_lmer <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B1W_long_I, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 1.582839
full_lmer <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B1W_long_P, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 2.017653
full_lmer <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B1W_long_ECs, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 24.72683
cohens_d <-emmeans(negaff_MEM_B1W, "Time", "Group")
eff_size(cohens_d, sigma = sigma(negaff_MEM_B1W), edf = df.residual(negaff_MEM_B1W))
## Group = A_ECs:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_negaff - C_W1_negaff -0.440 0.203 424 -0.840 -0.0399
##
## Group = B_Controls:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_negaff - C_W1_negaff -0.193 0.139 424 -0.466 0.0805
##
## Group = C_Intervention:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_negaff - C_W1_negaff -0.159 0.141 424 -0.437 0.1187
##
## sigma used for effect sizes: 33.43
## Degrees-of-freedom method: inherited from kenward-roger when re-gridding
## Confidence level used: 0.95
# Intervention
negaff_B1M_long_I <- negaff_B1M_long %>%
filter(Group == "C_Intervention")
negaff_MEM_B1M_I <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B1M_long_I, REML = TRUE)
summary(negaff_MEM_B1M_I)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Time + (1 | ID)
## Data: negaff_B1M_long_I
##
## REML criterion at convergence: 1998.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.00689 -0.59722 -0.05351 0.49148 2.66419
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 796 28.21
## Residual 1208 34.76
## Number of obs: 194, groups: ID, 103
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -29.631 4.411 168.307 -6.717 2.74e-10 ***
## TimeD_M1_negaff 6.540 5.062 97.789 1.292 0.199
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmD_M1_ngff -0.525
anova (negaff_MEM_B1M_I)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 2016.8 2016.8 1 97.789 1.669 0.1994
performance::r2(negaff_MEM_B1M_I)
## # R2 for Mixed Models
##
## Conditional R2: 0.400
## Marginal R2: 0.005
parameters::standardise_parameters(negaff_MEM_B1M_I)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -----------------------------------------------
## (Intercept) | -0.07 | [-0.26, 0.13]
## Time [D_M1_negaff] | 0.15 | [-0.08, 0.37]
# Psychoeducation
negaff_B1M_long_P <- negaff_B1M_long %>%
filter(Group == "B_Controls")
negaff_MEM_B1M_P <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B1M_long_P, REML = TRUE)
summary(negaff_MEM_B1M_P)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Time + (1 | ID)
## Data: negaff_B1M_long_P
##
## REML criterion at convergence: 2073.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.3066 -0.6149 -0.1241 0.5220 2.8060
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 896.5 29.94
## Residual 1263.0 35.54
## Number of obs: 200, groups: ID, 106
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -37.316 4.514 172.231 -8.268 3.55e-14 ***
## TimeD_M1_negaff 6.692 5.097 102.145 1.313 0.192
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmD_M1_ngff -0.518
anova (negaff_MEM_B1M_P)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 2177 2177 1 102.14 1.7237 0.1922
performance::r2(negaff_MEM_B1M_P)
## # R2 for Mixed Models
##
## Conditional R2: 0.418
## Marginal R2: 0.005
parameters::standardise_parameters(negaff_MEM_B1M_P)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -----------------------------------------------
## (Intercept) | -0.07 | [-0.26, 0.12]
## Time [D_M1_negaff] | 0.14 | [-0.07, 0.36]
# No-Training
negaff_B1M_long_ECs <- negaff_B1M_long %>%
filter(Group == "A_ECs")
negaff_MEM_B1M_ECs <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B1M_long_ECs, REML = TRUE)
summary(negaff_MEM_B1M_ECs)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Time + (1 | ID)
## Data: negaff_B1M_long_ECs
##
## REML criterion at convergence: 936.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.3636 -0.6449 0.0058 0.6197 2.3029
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 1118 33.44
## Residual 799 28.27
## Number of obs: 93, groups: ID, 50
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -40.300 6.192 69.556 -6.508 9.94e-09 ***
## TimeD_M1_negaff 21.026 6.007 44.217 3.500 0.00107 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmD_M1_ngff -0.430
anova (negaff_MEM_B1M_ECs)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 9790.7 9790.7 1 44.217 12.253 0.001073 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_B1M_ECs)
## # R2 for Mixed Models
##
## Conditional R2: 0.606
## Marginal R2: 0.055
parameters::standardise_parameters(negaff_MEM_B1M_ECs)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -----------------------------------------------
## (Intercept) | -0.21 | [-0.49, 0.06]
## Time [D_M1_negaff] | 0.47 | [ 0.20, 0.74]
# BF
full_lmer <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B1M_long_I, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 2.09613
full_lmer <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B1M_long_P, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 2.137177
full_lmer <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B1M_long_ECs, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 376.9288
cohens_d <-emmeans(negaff_MEM_B1M, "Time", "Group")
eff_size(cohens_d, sigma = sigma(negaff_MEM_B1M), edf = df.residual(negaff_MEM_B1M))
## Group = A_ECs:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_negaff - D_M1_negaff -0.614 0.212 409 -1.031 -0.1964
##
## Group = B_Controls:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_negaff - D_M1_negaff -0.196 0.144 409 -0.479 0.0862
##
## Group = C_Intervention:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_negaff - D_M1_negaff -0.192 0.146 409 -0.479 0.0945
##
## sigma used for effect sizes: 34.01
## Degrees-of-freedom method: inherited from kenward-roger when re-gridding
## Confidence level used: 0.95
# Intervention
negaff_B3M_long_I <- negaff_B3M_long %>%
filter(Group == "C_Intervention")
negaff_MEM_B3M_I <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B3M_long_I, REML = TRUE)
summary(negaff_MEM_B3M_I)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Time + (1 | ID)
## Data: negaff_B3M_long_I
##
## REML criterion at convergence: 1911.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.9504 -0.5813 -0.0416 0.4764 2.2063
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 933.1 30.55
## Residual 1081.9 32.89
## Number of obs: 186, groups: ID, 103
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -29.631 4.423 155.621 -6.699 3.61e-10 ***
## TimeE_M3_negaff 3.816 4.971 91.680 0.768 0.445
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmE_M3_ngff -0.478
anova (negaff_MEM_B3M_I)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 637.45 637.45 1 91.68 0.5892 0.4447
performance::r2(negaff_MEM_B3M_I)
## # R2 for Mixed Models
##
## Conditional R2: 0.464
## Marginal R2: 0.002
parameters::standardise_parameters(negaff_MEM_B3M_I)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -----------------------------------------------
## (Intercept) | -0.03 | [-0.23, 0.16]
## Time [E_M3_negaff] | 0.09 | [-0.13, 0.30]
# Psychoeducation
negaff_B3M_long_P <- negaff_B3M_long %>%
filter(Group == "B_Controls")
negaff_MEM_B3M_P <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B3M_long_P, REML = TRUE)
summary(negaff_MEM_B3M_P)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Time + (1 | ID)
## Data: negaff_B3M_long_P
##
## REML criterion at convergence: 2115.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.1151 -0.6724 -0.1010 0.5441 2.6593
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 748.5 27.36
## Residual 1461.4 38.23
## Number of obs: 203, groups: ID, 106
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -37.316 4.566 181.201 -8.173 5.06e-14 ***
## TimeE_M3_negaff 7.521 5.412 100.729 1.390 0.168
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmE_M3_ngff -0.558
anova (negaff_MEM_B3M_P)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 2822.4 2822.4 1 100.73 1.9313 0.1677
performance::r2(negaff_MEM_B3M_P)
## # R2 for Mixed Models
##
## Conditional R2: 0.343
## Marginal R2: 0.006
parameters::standardise_parameters(negaff_MEM_B3M_P)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -----------------------------------------------
## (Intercept) | -0.07 | [-0.27, 0.12]
## Time [E_M3_negaff] | 0.16 | [-0.07, 0.39]
# No-Training
negaff_B3M_long_ECs <- negaff_B3M_long %>%
filter(Group == "A_ECs")
negaff_MEM_B3M_ECs <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B3M_long_ECs, REML = TRUE)
summary(negaff_MEM_B3M_ECs)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Time + (1 | ID)
## Data: negaff_B3M_long_ECs
##
## REML criterion at convergence: 897.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.54875 -0.58069 -0.00356 0.46416 2.59991
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 765.4 27.67
## Residual 1016.4 31.88
## Number of obs: 89, groups: ID, 50
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -40.300 5.970 74.668 -6.751 2.76e-09 ***
## TimeE_M3_negaff 25.330 6.989 41.874 3.624 0.000779 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmE_M3_ngff -0.487
anova (negaff_MEM_B3M_ECs)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 13349 13349 1 41.874 13.135 0.0007785 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_B3M_ECs)
## # R2 for Mixed Models
##
## Conditional R2: 0.477
## Marginal R2: 0.082
parameters::standardise_parameters(negaff_MEM_B3M_ECs)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -----------------------------------------------
## (Intercept) | -0.23 | [-0.51, 0.04]
## Time [E_M3_negaff] | 0.58 | [ 0.26, 0.90]
# BF
full_lmer <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B3M_long_I, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 1.226308
full_lmer <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B3M_long_P, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 2.492926
full_lmer <- lmer(Mood_Score ~ Time + (1|ID), data = negaff_B3M_long_ECs, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 492.2549
cohens_d <-emmeans(negaff_MEM_B3m, "Time", "Group")
eff_size(cohens_d, sigma = sigma(negaff_MEM_B3m), edf = df.residual(negaff_MEM_B3m))
## Group = A_ECs:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_negaff - E_M3_negaff -0.716 0.220 413 -1.149 -0.2830
##
## Group = B_Controls:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_negaff - E_M3_negaff -0.215 0.142 413 -0.494 0.0638
##
## Group = C_Intervention:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_negaff - E_M3_negaff -0.107 0.151 413 -0.403 0.1895
##
## sigma used for effect sizes: 35.16
## Degrees-of-freedom method: inherited from kenward-roger when re-gridding
## Confidence level used: 0.95
# Intervention vs Psychoeducation
negaff_BP_long_IP <- negaff_BP_long %>%
filter(Group != "A_ECs")
negaff_MEM_BP_IP <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_BP_long_IP, REML = TRUE)
summary(negaff_MEM_BP_IP)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Group * Time + (1 | ID)
## Data: negaff_BP_long_IP
##
## REML criterion at convergence: 4120.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.1018 -0.4396 -0.0450 0.3982 3.9638
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 949.4 30.81
## Residual 583.6 24.16
## Number of obs: 417, groups: ID, 209
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) -37.316 3.803 298.868 -9.812
## GroupC_Intervention 7.685 5.417 298.868 1.419
## TimeB_POST_negaff -19.972 3.318 206.132 -6.018
## GroupC_Intervention:TimeB_POST_negaff -9.334 4.737 206.447 -1.971
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## GroupC_Intervention 0.1571
## TimeB_POST_negaff 7.94e-09 ***
## GroupC_Intervention:TimeB_POST_negaff 0.0501 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpC_I TB_POS
## GrpC_Intrvn -0.702
## TmB_POST_ng -0.436 0.306
## GC_I:TB_POS 0.306 -0.435 -0.701
anova (negaff_MEM_BP_IP)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 224 224 1 207.07 0.3830 0.5367
## Time 63171 63171 1 206.45 108.2366 <2e-16 ***
## Group:Time 2266 2266 1 206.45 3.8834 0.0501 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_BP_IP)
## # R2 for Mixed Models
##
## Conditional R2: 0.655
## Marginal R2: 0.094
parameters::standardise_parameters(negaff_MEM_BP_IP)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------------------------------
## (Intercept) | 0.21 | [ 0.02, 0.39]
## Group [C_Intervention] | 0.19 | [-0.07, 0.45]
## Time [B_POST_negaff] | -0.49 | [-0.65, -0.33]
## Group [C_Intervention] × Time [B_POST_negaff] | -0.23 | [-0.45, 0.00]
# BF
full_lmer <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_BP_long_IP, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 4.010418
# Intervention vs Psychoeducation
negaff_B1W_long_IP <- negaff_B1W_long %>%
filter(Group != "A_ECs")
negaff_MEM_B1W_IP <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1W_long_IP, REML = TRUE)
summary(negaff_MEM_B1W_IP)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Group * Time + (1 | ID)
## Data: negaff_B1W_long_IP
##
## REML criterion at convergence: 4239.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.42187 -0.57333 -0.09503 0.43327 3.08924
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 911.9 30.20
## Residual 1165.8 34.14
## Number of obs: 411, groups: ID, 209
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) -37.316 4.427 343.034 -8.429
## GroupC_Intervention 7.685 6.307 343.034 1.219
## TimeC_W1_negaff 6.439 4.739 204.080 1.359
## GroupC_Intervention:TimeC_W1_negaff -1.110 6.764 204.532 -0.164
## Pr(>|t|)
## (Intercept) 9.78e-16 ***
## GroupC_Intervention 0.224
## TimeC_W1_negaff 0.176
## GroupC_Intervention:TimeC_W1_negaff 0.870
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpC_I TC_W1_
## GrpC_Intrvn -0.702
## TmC_W1_ngff -0.524 0.368
## GC_I:TC_W1_ 0.367 -0.523 -0.701
anova (negaff_MEM_B1W_IP)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 2051.0 2051.0 1 207.69 1.7593 0.18616
## Time 3529.0 3529.0 1 204.53 3.0271 0.08339 .
## Group:Time 31.4 31.4 1 204.53 0.0269 0.86977
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_B1W_IP)
## # R2 for Mixed Models
##
## Conditional R2: 0.445
## Marginal R2: 0.010
parameters::standardise_parameters(negaff_MEM_B1W_IP)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ------------------------------------------------------------------------
## (Intercept) | -0.14 | [-0.34, 0.05]
## Group [C_Intervention] | 0.17 | [-0.10, 0.44]
## Time [C_W1_negaff] | 0.14 | [-0.06, 0.34]
## Group [C_Intervention] × Time [C_W1_negaff] | -0.02 | [-0.32, 0.27]
# BF
full_lmer <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1W_long_IP, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.8466624
# Intervention vs No-Training
negaff_B1W_long_IEC <- negaff_B1W_long %>%
filter(Group != "B_Controls")
negaff_MEM_B1W_IEC <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1W_long_IEC, REML = TRUE)
summary(negaff_MEM_B1W_IEC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Group * Time + (1 | ID)
## Data: negaff_B1W_long_IEC
##
## REML criterion at convergence: 3053.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.5798 -0.5688 -0.0836 0.4490 3.2764
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 831.4 28.83
## Residual 1032.4 32.13
## Number of obs: 300, groups: ID, 153
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) -40.300 6.105 248.616 -6.601
## GroupC_Intervention 10.669 7.441 248.616 1.434
## TimeC_W1_negaff 14.705 6.522 149.217 2.255
## GroupC_Intervention:TimeC_W1_negaff -9.371 7.948 149.194 -1.179
## Pr(>|t|)
## (Intercept) 2.45e-10 ***
## GroupC_Intervention 0.1529
## TimeC_W1_negaff 0.0256 *
## GroupC_Intervention:TimeC_W1_negaff 0.2403
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpC_I TC_W1_
## GrpC_Intrvn -0.820
## TmC_W1_ngff -0.519 0.425
## GC_I:TC_W1_ 0.426 -0.519 -0.821
anova (negaff_MEM_B1W_IEC)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 912.8 912.8 1 151.96 0.8841 0.34857
## Time 6562.3 6562.3 1 149.19 6.3562 0.01275 *
## Group:Time 1435.2 1435.2 1 149.19 1.3901 0.24026
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_B1W_IEC)
## # R2 for Mixed Models
##
## Conditional R2: 0.455
## Marginal R2: 0.016
parameters::standardise_parameters(negaff_MEM_B1W_IEC)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ------------------------------------------------------------------------
## (Intercept) | -0.26 | [-0.54, 0.02]
## Group [C_Intervention] | 0.25 | [-0.09, 0.58]
## Time [C_W1_negaff] | 0.34 | [ 0.04, 0.64]
## Group [C_Intervention] × Time [C_W1_negaff] | -0.22 | [-0.58, 0.14]
# BF
full_lmer <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1W_long_IEC, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 2.304549
# Psychoeducation vs No-Training
negaff_B1W_long_PEC <- negaff_B1W_long %>%
filter(Group != "C_Intervention")
negaff_MEM_B1W_PEC <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1W_long_PEC, REML = TRUE)
summary(negaff_MEM_B1W_PEC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Group * Time + (1 | ID)
## Data: negaff_B1W_long_PEC
##
## REML criterion at convergence: 3146.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.4329 -0.6165 -0.1419 0.4536 2.9502
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 839.1 28.97
## Residual 1136.1 33.71
## Number of obs: 307, groups: ID, 156
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -40.300 6.285 258.099 -6.412 6.8e-10
## GroupB_Controls 2.984 7.625 258.099 0.391 0.6959
## TimeC_W1_negaff 14.704 6.840 153.217 2.150 0.0332
## GroupB_Controls:TimeC_W1_negaff -8.263 8.287 152.979 -0.997 0.3203
##
## (Intercept) ***
## GroupB_Controls
## TimeC_W1_negaff *
## GroupB_Controls:TimeC_W1_negaff
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C TC_W1_
## GrpB_Cntrls -0.824
## TmC_W1_ngff -0.528 0.436
## GB_C:TC_W1_ 0.436 -0.529 -0.825
anova (negaff_MEM_B1W_PEC)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 35.7 35.7 1 155.17 0.0315 0.8595
## Time 7396.8 7396.8 1 152.98 6.5109 0.0117 *
## Group:Time 1129.5 1129.5 1 152.98 0.9942 0.3203
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_B1W_PEC)
## # R2 for Mixed Models
##
## Conditional R2: 0.432
## Marginal R2: 0.012
parameters::standardise_parameters(negaff_MEM_B1W_PEC)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------------------------
## (Intercept) | -0.15 | [-0.42, 0.13]
## Group [B_Controls] | 0.07 | [-0.27, 0.40]
## Time [C_W1_negaff] | 0.33 | [ 0.03, 0.63]
## Group [B_Controls] × Time [C_W1_negaff] | -0.19 | [-0.55, 0.18]
# BF
full_lmer <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1W_long_PEC, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 1.948968
# Intervention vs Psychoeducation
negaff_B1M_long_IP <- negaff_B1M_long %>%
filter(Group != "A_ECs")
negaff_MEM_B1M_IP <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1M_long_IP, REML = TRUE)
summary(negaff_MEM_B1M_IP)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Group * Time + (1 | ID)
## Data: negaff_B1M_long_IP
##
## REML criterion at convergence: 4072.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.32670 -0.59484 -0.07157 0.48707 2.84172
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 847.4 29.11
## Residual 1235.9 35.16
## Number of obs: 394, groups: ID, 209
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) -37.3160 4.4332 340.4706 -8.417
## GroupC_Intervention 7.6850 6.3150 340.4706 1.217
## TimeD_M1_negaff 6.6984 5.0411 199.8632 1.329
## GroupC_Intervention:TimeD_M1_negaff -0.1574 7.1859 200.0128 -0.022
## Pr(>|t|)
## (Intercept) 1.08e-15 ***
## GroupC_Intervention 0.224
## TimeD_M1_negaff 0.185
## GroupC_Intervention:TimeD_M1_negaff 0.983
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpC_I TD_M1_
## GrpC_Intrvn -0.702
## TmD_M1_ngff -0.522 0.366
## GC_I:TD_M1_ 0.366 -0.521 -0.702
anova (negaff_MEM_B1M_IP)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 2454.6 2454.6 1 210.79 1.9861 0.1602
## Time 4195.3 4195.3 1 200.01 3.3945 0.0669 .
## Group:Time 0.6 0.6 1 200.01 0.0005 0.9825
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_B1M_IP)
## # R2 for Mixed Models
##
## Conditional R2: 0.414
## Marginal R2: 0.012
parameters::standardise_parameters(negaff_MEM_B1M_IP)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ------------------------------------------------------------------------
## (Intercept) | -0.15 | [-0.34, 0.04]
## Group [C_Intervention] | 0.17 | [-0.10, 0.44]
## Time [D_M1_negaff] | 0.15 | [-0.07, 0.36]
## Group [C_Intervention] × Time [D_M1_negaff] | -3.43e-03 | [-0.31, 0.30]
# BF
full_lmer <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1M_long_IP, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.9065315
# Intervention vs No-Training
negaff_B1M_long_IEC <- negaff_B1M_long %>%
filter(Group != "B_Controls")
negaff_MEM_B1M_IEC <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1M_long_IEC, REML = TRUE)
summary(negaff_MEM_B1M_IEC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Group * Time + (1 | ID)
## Data: negaff_B1M_long_IEC
##
## REML criterion at convergence: 2937.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.13648 -0.60110 -0.05791 0.50688 2.72788
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 893.8 29.90
## Residual 1080.7 32.87
## Number of obs: 287, groups: ID, 153
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) -40.300 6.284 238.967 -6.413
## GroupC_Intervention 10.669 7.659 238.967 1.393
## TimeD_M1_negaff 20.892 6.953 143.124 3.005
## GroupC_Intervention:TimeD_M1_negaff -14.346 8.446 142.655 -1.699
## Pr(>|t|)
## (Intercept) 7.56e-10 ***
## GroupC_Intervention 0.16491
## TimeD_M1_negaff 0.00314 **
## GroupC_Intervention:TimeD_M1_negaff 0.09158 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpC_I TD_M1_
## GrpC_Intrvn -0.820
## TmD_M1_ngff -0.495 0.406
## GC_I:TD_M1_ 0.407 -0.496 -0.823
anova (negaff_MEM_B1M_IEC)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 297.6 297.6 1 152.30 0.2754 0.600523
## Time 11405.9 11405.9 1 142.66 10.5545 0.001445 **
## Group:Time 3117.9 3117.9 1 142.66 2.8852 0.091578 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_B1M_IEC)
## # R2 for Mixed Models
##
## Conditional R2: 0.465
## Marginal R2: 0.023
parameters::standardise_parameters(negaff_MEM_B1M_IEC)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ------------------------------------------------------------------------
## (Intercept) | -0.28 | [-0.55, 0.00]
## Group [C_Intervention] | 0.24 | [-0.10, 0.58]
## Time [D_M1_negaff] | 0.47 | [ 0.16, 0.77]
## Group [C_Intervention] × Time [D_M1_negaff] | -0.32 | [-0.69, 0.05]
# BF
full_lmer <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1M_long_IEC, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 5.25035
# Psychoeducation vs No-Training
negaff_B1M_long_PEC <- negaff_B1M_long %>%
filter(Group != "C_Intervention")
negaff_MEM_B1M_PEC <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1M_long_PEC, REML = TRUE)
summary(negaff_MEM_B1M_PEC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Group * Time + (1 | ID)
## Data: negaff_B1M_long_PEC
##
## REML criterion at convergence: 3012.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.4746 -0.6260 -0.1016 0.5687 2.9484
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 958.1 30.95
## Residual 1122.1 33.50
## Number of obs: 293, groups: ID, 156
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -40.300 6.450 243.501 -6.248 1.84e-09
## GroupB_Controls 2.984 7.825 243.501 0.381 0.7033
## TimeD_M1_negaff 20.900 7.087 147.799 2.949 0.0037
## GroupB_Controls:TimeD_M1_negaff -14.242 8.565 147.270 -1.663 0.0985
##
## (Intercept) ***
## GroupB_Controls
## TimeD_M1_negaff **
## GroupB_Controls:TimeD_M1_negaff .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C TD_M1_
## GrpB_Cntrls -0.824
## TmD_M1_ngff -0.491 0.405
## GB_C:TD_M1_ 0.406 -0.493 -0.827
anova (negaff_MEM_B1M_PEC)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 412.6 412.6 1 157.06 0.3677 0.545115
## Time 11615.8 11615.8 1 147.27 10.3517 0.001591 **
## Group:Time 3102.3 3102.3 1 147.27 2.7647 0.098493 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_B1M_PEC)
## # R2 for Mixed Models
##
## Conditional R2: 0.472
## Marginal R2: 0.021
parameters::standardise_parameters(negaff_MEM_B1M_PEC)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------------------------
## (Intercept) | -0.16 | [-0.43, 0.12]
## Group [B_Controls] | 0.06 | [-0.27, 0.40]
## Time [D_M1_negaff] | 0.45 | [ 0.15, 0.76]
## Group [B_Controls] × Time [D_M1_negaff] | -0.31 | [-0.68, 0.06]
# BF
full_lmer <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B1M_long_PEC, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 4.962327
# Intervention vs Psychoeducation
negaff_B3M_long_IP <- negaff_B3M_long %>%
filter(Group != "A_ECs")
negaff_MEM_B3M_IP <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B3M_long_IP, REML = TRUE)
summary(negaff_MEM_B3M_IP)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Group * Time + (1 | ID)
## Data: negaff_B3M_long_IP
##
## REML criterion at convergence: 4029.2
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.29186 -0.65294 -0.06854 0.52028 2.80285
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 833 28.86
## Residual 1284 35.83
## Number of obs: 389, groups: ID, 209
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) -37.316 4.469 337.808 -8.350
## GroupC_Intervention 7.685 6.366 337.808 1.207
## TimeE_M3_negaff 7.563 5.079 188.708 1.489
## GroupC_Intervention:TimeE_M3_negaff -3.809 7.410 193.957 -0.514
## Pr(>|t|)
## (Intercept) 1.78e-15 ***
## GroupC_Intervention 0.228
## TimeE_M3_negaff 0.138
## GroupC_Intervention:TimeE_M3_negaff 0.608
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpC_I TE_M3_
## GrpC_Intrvn -0.702
## TmE_M3_ngff -0.534 0.375
## GC_I:TE_M3_ 0.366 -0.521 -0.685
anova (negaff_MEM_B3M_IP)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 1445.76 1445.76 1 206.97 1.1259 0.2899
## Time 2994.56 2994.56 1 193.96 2.3321 0.1284
## Group:Time 339.33 339.33 1 193.96 0.2643 0.6078
performance::r2(negaff_MEM_B3M_IP)
## # R2 for Mixed Models
##
## Conditional R2: 0.398
## Marginal R2: 0.008
parameters::standardise_parameters(negaff_MEM_B3M_IP)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ------------------------------------------------------------------------
## (Intercept) | -0.13 | [-0.33, 0.06]
## Group [C_Intervention] | 0.17 | [-0.10, 0.44]
## Time [E_M3_negaff] | 0.16 | [-0.05, 0.38]
## Group [C_Intervention] × Time [E_M3_negaff] | -0.08 | [-0.40, 0.23]
# BF
full_lmer <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B3M_long_IP, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 1.074062
# Intervention vs No-Training
negaff_B3M_long_IEC <- negaff_B3M_long %>%
filter(Group != "B_Controls")
negaff_MEM_B3M_IEC <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B3M_long_IEC, REML = TRUE)
summary(negaff_MEM_B3M_IEC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Group * Time + (1 | ID)
## Data: negaff_B3M_long_IEC
##
## REML criterion at convergence: 2809.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.97274 -0.59330 -0.04227 0.46972 2.50509
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 880.2 29.67
## Residual 1060.2 32.56
## Number of obs: 275, groups: ID, 153
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) -40.300 6.230 230.219 -6.469
## GroupC_Intervention 10.669 7.593 230.219 1.405
## TimeE_M3_negaff 25.453 7.148 134.873 3.561
## GroupC_Intervention:TimeE_M3_negaff -21.645 8.677 134.350 -2.495
## Pr(>|t|)
## (Intercept) 5.85e-10 ***
## GroupC_Intervention 0.161312
## TimeE_M3_negaff 0.000512 ***
## GroupC_Intervention:TimeE_M3_negaff 0.013824 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpC_I TE_M3_
## GrpC_Intrvn -0.820
## TmE_M3_ngff -0.476 0.391
## GC_I:TE_M3_ 0.392 -0.478 -0.824
anova (negaff_MEM_B3M_IEC)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 0.6 0.6 1 151.34 0.0005 0.9817358
## Time 12055.3 12055.3 1 134.35 11.3711 0.0009746 ***
## Group:Time 6597.2 6597.2 1 134.35 6.2228 0.0138239 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_B3M_IEC)
## # R2 for Mixed Models
##
## Conditional R2: 0.469
## Marginal R2: 0.027
parameters::standardise_parameters(negaff_MEM_B3M_IEC)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -------------------------------------------------------------------------
## (Intercept) | -0.26 | [-0.54, 0.02]
## Group [C_Intervention] | 0.24 | [-0.10, 0.58]
## Time [E_M3_negaff] | 0.57 | [ 0.26, 0.89]
## Group [C_Intervention] × Time [E_M3_negaff] | -0.49 | [-0.87, -0.10]
# BF
full_lmer <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B3M_long_IEC, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 27.43467
# Psychoeducation vs No-Training
negaff_B3M_long_PEC <- negaff_B3M_long %>%
filter(Group != "C_Intervention")
negaff_MEM_B3M_PEC <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B3M_long_PEC, REML = TRUE)
summary(negaff_MEM_B3M_PEC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Mood_Score ~ Group * Time + (1 | ID)
## Data: negaff_B3M_long_PEC
##
## REML criterion at convergence: 3015.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.22752 -0.66823 -0.08687 0.50441 2.77169
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 745.7 27.31
## Residual 1333.2 36.51
## Number of obs: 292, groups: ID, 156
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) -40.300 6.448 257.246 -6.250 1.7e-09
## GroupB_Controls 2.984 7.822 257.246 0.381 0.70317
## TimeE_M3_negaff 24.970 7.972 150.646 3.132 0.00208
## GroupB_Controls:TimeE_M3_negaff -17.434 9.502 147.669 -1.835 0.06855
##
## (Intercept) ***
## GroupB_Controls
## TimeE_M3_negaff **
## GroupB_Controls:TimeE_M3_negaff .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C TE_M3_
## GrpB_Cntrls -0.824
## TmE_M3_ngff -0.519 0.428
## GB_C:TE_M3_ 0.435 -0.528 -0.839
anova (negaff_MEM_B3M_PEC)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 984.2 984.2 1 156.48 0.7383 0.3915354
## Time 15602.8 15602.8 1 147.67 11.7033 0.0008071 ***
## Group:Time 4488.1 4488.1 1 147.67 3.3664 0.0685516 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(negaff_MEM_B3M_PEC)
## # R2 for Mixed Models
##
## Conditional R2: 0.377
## Marginal R2: 0.028
parameters::standardise_parameters(negaff_MEM_B3M_PEC)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------------------------
## (Intercept) | -0.17 | [-0.44, 0.11]
## Group [B_Controls] | 0.06 | [-0.27, 0.40]
## Time [E_M3_negaff] | 0.54 | [ 0.20, 0.89]
## Group [B_Controls] × Time [E_M3_negaff] | -0.38 | [-0.79, 0.03]
# BF
full_lmer <- lmer(Mood_Score ~ Group * Time + (1|ID), data = negaff_B3M_long_PEC, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 7.3759
Mediation <-
'#regressions
negaff_BP_change ~ c1 * Group
IUS_BP_change ~ a1 * Group
negaff_BP_change ~ b1*IUS_BP_change
indirect1 := a1 * b1
direct := c1
total := c1 + (a1 * b1)
'
Mediation.distress <- lavaan::sem(Mediation, data=Full_data, std.lv=T, std.ov=T, missing='fiml', se='robust', estimator='mlr', auto.var = T)
summary(Mediation.distress, standardized=T, rsquare=T, ci = T)
## lavaan 0.6-19 ended normally after 17 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 7
##
## Number of observations 259
## Number of missing patterns 3
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 0.000 0.000
## Degrees of freedom 0 0
##
## Parameter Estimates:
##
## Standard errors Sandwich
## Information bread Observed
## Observed information based on Hessian
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## negaff_BP_change ~
## Group (c1) -0.315 0.076 -4.119 0.000 -0.464 -0.165
## IUS_BP_change ~
## Group (a1) -0.403 0.079 -5.103 0.000 -0.558 -0.248
## negaff_BP_change ~
## IUS_BP_ch (b1) 0.246 0.070 3.524 0.000 0.109 0.383
## Std.lv Std.all
##
## -0.315 -0.233
##
## -0.403 -0.299
##
## 0.246 0.246
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .negaff_BP_chng 0.693 0.164 4.220 0.000 0.371 1.014
## .IUS_BP_change 0.887 0.165 5.388 0.000 0.565 1.210
## Std.lv Std.all
## 0.693 0.694
## 0.887 0.889
##
## Variances:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .negaff_BP_chng 0.847 0.143 5.912 0.000 0.566 1.128
## .IUS_BP_change 0.906 0.114 7.947 0.000 0.683 1.130
## Std.lv Std.all
## 0.847 0.850
## 0.906 0.910
##
## R-Square:
## Estimate
## negaff_BP_chng 0.150
## IUS_BP_change 0.090
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## indirect1 -0.099 0.032 -3.152 0.002 -0.161 -0.038
## direct -0.315 0.076 -4.119 0.000 -0.464 -0.165
## total -0.414 0.072 -5.736 0.000 -0.555 -0.272
## Std.lv Std.all
## -0.099 -0.074
## -0.315 -0.233
## -0.414 -0.307
Mediation <-
'#regressions
negaff_B1W_change ~ c1 * Group
IUS_B1W_change ~ a1 * Group
negaff_B1W_change ~ b1*IUS_B1W_change
indirect1 := a1 * b1
direct := c1
total := c1 + (a1 * b1)
'
Mediation.distress <- lavaan::sem(Mediation, data=Full_data, std.lv=T, std.ov=T, missing='fiml', se='robust', estimator='mlr', auto.var = T)
summary(Mediation.distress, standardized=T, rsquare=T, ci = T)
## lavaan 0.6-19 ended normally after 16 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 7
##
## Number of observations 259
## Number of missing patterns 3
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 0.000 0.000
## Degrees of freedom 0 0
##
## Parameter Estimates:
##
## Standard errors Sandwich
## Information bread Observed
## Observed information based on Hessian
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## negaff_B1W_change ~
## Group (c1) -0.020 0.088 -0.223 0.823 -0.193 0.153
## IUS_B1W_change ~
## Group (a1) -0.374 0.076 -4.913 0.000 -0.523 -0.225
## negaff_B1W_change ~
## IUS_B1W_c (b1) 0.170 0.076 2.246 0.025 0.022 0.319
## Std.lv Std.all
##
## -0.020 -0.015
##
## -0.374 -0.278
##
## 0.170 0.171
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .negff_B1W_chng 0.042 0.202 0.207 0.836 -0.355 0.439
## .IUS_B1W_change 0.826 0.161 5.135 0.000 0.510 1.141
## Std.lv Std.all
## 0.042 0.042
## 0.826 0.827
##
## Variances:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .negff_B1W_chng 0.966 0.121 7.987 0.000 0.729 1.202
## .IUS_B1W_change 0.920 0.116 7.943 0.000 0.693 1.147
## Std.lv Std.all
## 0.966 0.969
## 0.920 0.923
##
## R-Square:
## Estimate
## negff_B1W_chng 0.031
## IUS_B1W_change 0.077
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## indirect1 -0.064 0.030 -2.158 0.031 -0.122 -0.006
## direct -0.020 0.088 -0.223 0.823 -0.193 0.153
## total -0.084 0.081 -1.035 0.301 -0.242 0.075
## Std.lv Std.all
## -0.064 -0.047
## -0.020 -0.015
## -0.084 -0.062
Mediation <-
'#regressions
negaff_B1M_change ~ c1 * Group
IUS_B1M_change ~ a1 * Group
negaff_B1M_change ~ b1*IUS_B1M_change
indirect1 := a1 * b1
direct := c1
total := c1 + (a1 * b1)
'
Mediation.distress <- lavaan::sem(Mediation, data=Full_data, std.lv=T, std.ov=T, missing='fiml', se='robust', estimator='mlr', auto.var = T)
summary(Mediation.distress, standardized=T, rsquare=T, ci = T)
## lavaan 0.6-19 ended normally after 16 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 7
##
## Number of observations 259
## Number of missing patterns 4
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 0.000 0.000
## Degrees of freedom 0 0
##
## Parameter Estimates:
##
## Standard errors Sandwich
## Information bread Observed
## Observed information based on Hessian
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## negaff_B1M_change ~
## Group (c1) -0.025 0.092 -0.269 0.788 -0.204 0.155
## IUS_B1M_change ~
## Group (a1) -0.416 0.076 -5.495 0.000 -0.564 -0.267
## negaff_B1M_change ~
## IUS_B1M_c (b1) 0.244 0.085 2.857 0.004 0.077 0.412
## Std.lv Std.all
##
## -0.025 -0.018
##
## -0.416 -0.308
##
## 0.244 0.244
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .negff_B1M_chng 0.053 0.209 0.255 0.798 -0.356 0.463
## .IUS_B1M_change 0.914 0.163 5.593 0.000 0.594 1.234
## Std.lv Std.all
## 0.053 0.053
## 0.914 0.916
##
## Variances:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .negff_B1M_chng 0.935 0.104 9.030 0.000 0.732 1.138
## .IUS_B1M_change 0.902 0.101 8.898 0.000 0.703 1.100
## Std.lv Std.all
## 0.935 0.937
## 0.902 0.905
##
## R-Square:
## Estimate
## negff_B1M_chng 0.063
## IUS_B1M_change 0.095
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## indirect1 -0.101 0.038 -2.655 0.008 -0.176 -0.027
## direct -0.025 0.092 -0.269 0.788 -0.204 0.155
## total -0.126 0.083 -1.524 0.127 -0.288 0.036
## Std.lv Std.all
## -0.101 -0.075
## -0.025 -0.018
## -0.126 -0.094
Mediation <-
'#regressions
negaff_B3M_change ~ c1 * Group
IUS_B3M_change ~ a1 * Group
negaff_B3M_change ~ b1*IUS_B3M_change
indirect1 := a1 * b1
direct := c1
total := c1 + (a1 * b1)
'
Mediation.distress <- lavaan::sem(Mediation, data=Full_data, std.lv=T, std.ov=T, missing='fiml', se='robust', estimator='mlr', auto.var = T)
summary(Mediation.distress, standardized=T, rsquare=T, ci = T)
## lavaan 0.6-19 ended normally after 14 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 7
##
## Number of observations 259
## Number of missing patterns 4
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 0.000 0.000
## Degrees of freedom 0 0
##
## Parameter Estimates:
##
## Standard errors Sandwich
## Information bread Observed
## Observed information based on Hessian
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## negaff_B3M_change ~
## Group (c1) -0.129 0.086 -1.502 0.133 -0.298 0.039
## IUS_B3M_change ~
## Group (a1) -0.261 0.082 -3.192 0.001 -0.422 -0.101
## negaff_B3M_change ~
## IUS_B3M_c (b1) 0.295 0.085 3.487 0.000 0.129 0.461
## Std.lv Std.all
##
## -0.129 -0.096
##
## -0.261 -0.194
##
## 0.295 0.295
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .negff_B3M_chng 0.283 0.201 1.412 0.158 -0.110 0.676
## .IUS_B3M_change 0.574 0.183 3.140 0.002 0.216 0.932
## Std.lv Std.all
## 0.283 0.284
## 0.574 0.575
##
## Variances:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .negff_B3M_chng 0.889 0.087 10.259 0.000 0.719 1.059
## .IUS_B3M_change 0.959 0.125 7.702 0.000 0.715 1.204
## Std.lv Std.all
## 0.889 0.893
## 0.959 0.962
##
## R-Square:
## Estimate
## negff_B3M_chng 0.107
## IUS_B3M_change 0.038
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## indirect1 -0.077 0.031 -2.458 0.014 -0.138 -0.016
## direct -0.129 0.086 -1.502 0.133 -0.298 0.039
## total -0.206 0.086 -2.408 0.016 -0.374 -0.038
## Std.lv Std.all
## -0.077 -0.057
## -0.129 -0.096
## -0.206 -0.153
GM_alltimepoints <- Full_data %>%
dplyr::select("A_PRE_GM", "B_POST_GM", "C_W1_GM", "D_M1_GM","E_M3_GM", "Group") %>%
pivot_longer(cols = c(A_PRE_GM, B_POST_GM, C_W1_GM, D_M1_GM, E_M3_GM),
names_to = "Time",
values_to = "GM_Score")
e <- GM_alltimepoints %>%
mutate(Time=case_when(
Time == "A_PRE_GM" ~ "Baseline",
Time == "B_POST_GM" ~ "Post",
Time == "C_W1_GM" ~ "1 Week",
Time == "D_M1_GM" ~ "1 Month",
Time == "E_M3_GM" ~ "3 Months"
)) %>%
mutate(Time=factor(Time, levels=c("Baseline", "Post", "1 Week", "1 Month", "3 Months"))) %>%
mutate(Group=case_when(
Group == "A_ECs" ~ "\nNo-Training\nControl",
Group == "B_Controls" ~ "\nPsychoeducation\nControl",
Group == "C_Intervention" ~ "\nUncertainty-Mindsets\nTraining")) %>%
mutate(Group=factor(Group, levels=c("\nNo-Training\nControl", "\nPsychoeducation\nControl", "\nUncertainty-Mindsets\nTraining"))) %>%
ggplot(aes(x = Time, y = GM_Score, color = Group, fill = Group, group = Group)) +
#stat_summary(fun = mean, geom = "line") + # Calculate and plot the mean as a line
stat_summary(fun = mean, geom = "point") + # Add points at the mean values
scale_y_continuous(name = "Growth Mindsets") +
theme_bw() +
theme(legend.position = "none") +
geom_smooth(se = TRUE, level = 0.95, alpha = 0.25)
GM_gg <- ggMarginal(e,groupColour = TRUE, groupFill = TRUE, type = "density")
## Warning: Removed 81 rows containing non-finite outside the scale range
## (`stat_summary()`).
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning: Removed 81 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Removed 81 rows containing non-finite outside the scale range
## (`stat_summary()`).
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning: Removed 81 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x < range[1], value =
## "Baseline"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x > range[2], value =
## "Post"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x < range[1], value =
## "Baseline"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x > range[2], value =
## "Post"): NAs introduced by coercion
## Warning: Removed 15 rows containing non-finite outside the scale range
## (`stat_density()`).
## Removed 15 rows containing non-finite outside the scale range
## (`stat_density()`).
## Warning: No shared levels found between `names(values)` of the manual scale and the
## data's colour values.
## Warning: No shared levels found between `names(values)` of the manual scale and the
## data's fill values.
GM_gg
GM_BP <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GM", "B_POST_GM")
GM_BP_long <- GM_BP %>%
pivot_longer(cols = c(A_PRE_GM, B_POST_GM),
names_to = "Time",
values_to = "GM_Score")
GM_MEM_BP <- lmer(GM_Score ~ Group * Time + (1|ID), data = GM_BP_long, REML = TRUE)
summary(GM_MEM_BP)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GM_Score ~ Group * Time + (1 | ID)
## Data: GM_BP_long
##
## REML criterion at convergence: 1673.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.9611 -0.4087 0.0320 0.4356 2.5473
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 1.471 1.2128
## Residual 0.614 0.7836
## Number of obs: 516, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 4.2600 0.2042 341.6189 20.861 < 2e-16
## GroupB_Controls -0.4015 0.2477 341.6189 -1.621 0.105989
## GroupC_Intervention -0.1629 0.2489 341.6189 -0.655 0.513178
## TimeB_POST_GM -0.0400 0.1567 254.5431 -0.255 0.798745
## GroupB_Controls:TimeB_POST_GM 0.5306 0.1901 254.5431 2.791 0.005657
## GroupC_Intervention:TimeB_POST_GM 0.7237 0.1915 254.9544 3.779 0.000196
##
## (Intercept) ***
## GroupB_Controls
## GroupC_Intervention
## TimeB_POST_GM
## GroupB_Controls:TimeB_POST_GM **
## GroupC_Intervention:TimeB_POST_GM ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TB_POS GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmB_POST_GM -0.384 0.316 0.315
## GB_C:TB_POS 0.316 -0.384 -0.260 -0.824
## GC_I:TB_POS 0.314 -0.259 -0.383 -0.818 0.674
anova (GM_MEM_BP)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 2.0352 1.0176 2 256.34 1.6574 0.1926771
## Time 16.3667 16.3667 1 254.86 26.6558 4.9e-07 ***
## Group:Time 8.8331 4.4165 2 254.92 7.1931 0.0009142 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(GM_MEM_BP)
## # R2 for Mixed Models
##
## Conditional R2: 0.718
## Marginal R2: 0.043
parameters::standardise_parameters(GM_MEM_BP)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ----------------------------------------------------------------------
## (Intercept) | -1.11e-03 | [-0.27, 0.27]
## Group [B_Controls] | -0.27 | [-0.60, 0.06]
## Group [C_Intervention] | -0.11 | [-0.44, 0.22]
## Time [B_POST_GM] | -0.03 | [-0.24, 0.18]
## Group [B_Controls] × Time [B_POST_GM] | 0.36 | [ 0.11, 0.61]
## Group [C_Intervention] × Time [B_POST_GM] | 0.49 | [ 0.24, 0.75]
# BF
full_lmer <- lmer(GM_Score ~ Group + Time + (1|ID), data = GM_BP_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.002426745
full_lmer <- lmer(GM_Score ~ Group + Time + (1|ID), data = GM_BP_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 3566215
full_lmer <- lmer(GM_Score ~ Group * Time + (1|ID), data = GM_BP_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.3769363
GM_B1W <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GM", "C_W1_GM")
GM_B1W_long <- GM_B1W %>%
pivot_longer(cols = c(A_PRE_GM, C_W1_GM),
names_to = "Time",
values_to = "GM_Score")
GM_MEM_B1W <- lmer(GM_Score ~ Group * Time + (1|ID), data = GM_B1W_long, REML = TRUE)
summary(GM_MEM_B1W)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GM_Score ~ Group * Time + (1 | ID)
## Data: GM_B1W_long
##
## REML criterion at convergence: 1747.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.7870 -0.4940 0.1518 0.5109 2.2664
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 1.038 1.019
## Residual 1.010 1.005
## Number of obs: 511, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 4.2600 0.2024 403.7332 21.050 <2e-16
## GroupB_Controls -0.4015 0.2455 403.7332 -1.635 0.1027
## GroupC_Intervention -0.1629 0.2467 403.7332 -0.661 0.5093
## TimeC_W1_GM 0.0784 0.2041 253.9941 0.384 0.7012
## GroupB_Controls:TimeC_W1_GM 0.2376 0.2470 253.3522 0.962 0.3370
## GroupC_Intervention:TimeC_W1_GM 0.5133 0.2484 253.6544 2.066 0.0398
##
## (Intercept) ***
## GroupB_Controls
## GroupC_Intervention
## TimeC_W1_GM
## GroupB_Controls:TimeC_W1_GM
## GroupC_Intervention:TimeC_W1_GM *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TC_W1_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TimeC_W1_GM -0.489 0.403 0.401
## GB_C:TC_W1_ 0.404 -0.490 -0.332 -0.826
## GC_I:TC_W1_ 0.402 -0.331 -0.490 -0.822 0.679
anova (GM_MEM_B1W)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 5.0659 2.5329 2 256.72 2.5080 0.0834210 .
## Time 12.1159 12.1159 1 253.25 11.9969 0.0006256 ***
## Group:Time 4.6763 2.3381 2 253.08 2.3152 0.1008383
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(GM_MEM_B1W)
## # R2 for Mixed Models
##
## Conditional R2: 0.524
## Marginal R2: 0.035
parameters::standardise_parameters(GM_MEM_B1W)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------------------------
## (Intercept) | 0.03 | [-0.24, 0.31]
## Group [B_Controls] | -0.28 | [-0.61, 0.06]
## Group [C_Intervention] | -0.11 | [-0.45, 0.22]
## Time [C_W1_GM] | 0.05 | [-0.22, 0.33]
## Group [B_Controls] × Time [C_W1_GM] | 0.16 | [-0.17, 0.50]
## Group [C_Intervention] × Time [C_W1_GM] | 0.35 | [ 0.02, 0.69]
# BF
full_lmer <- lmer(GM_Score ~ Group + Time + (1|ID), data = GM_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.004970869
full_lmer <- lmer(GM_Score ~ Group + Time + (1|ID), data = GM_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 58.41477
full_lmer <- lmer(GM_Score ~ Group * Time + (1|ID), data = GM_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.005563526
GM_B1M <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GM", "D_M1_GM")
GM_B1M_long <- GM_B1M %>%
pivot_longer(cols = c(A_PRE_GM, D_M1_GM),
names_to = "Time",
values_to = "GM_Score")
GM_MEM_B1M <- lmer(GM_Score ~ Group * Time + (1|ID), data = GM_B1M_long, REML = TRUE)
summary(GM_MEM_B1M)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GM_Score ~ Group * Time + (1 | ID)
## Data: GM_B1M_long
##
## REML criterion at convergence: 1639.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.8661 -0.4999 0.1142 0.5367 2.3875
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 1.0920 1.0450
## Residual 0.8918 0.9444
## Number of obs: 487, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 4.26000 0.19919 375.54541 21.387 <2e-16
## GroupB_Controls -0.40151 0.24164 375.54541 -1.662 0.0974
## GroupC_Intervention -0.16291 0.24277 375.54541 -0.671 0.5026
## TimeD_M1_GM 0.03867 0.19861 235.43449 0.195 0.8458
## GroupB_Controls:TimeD_M1_GM 0.30728 0.24103 235.51016 1.275 0.2036
## GroupC_Intervention:TimeD_M1_GM 0.59125 0.24193 235.33298 2.444 0.0153
##
## (Intercept) ***
## GroupB_Controls .
## GroupC_Intervention
## TimeD_M1_GM
## GroupB_Controls:TimeD_M1_GM
## GroupC_Intervention:TimeD_M1_GM *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TD_M1_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TimeD_M1_GM -0.451 0.372 0.370
## GB_C:TD_M1_ 0.372 -0.451 -0.305 -0.824
## GC_I:TD_M1_ 0.370 -0.305 -0.451 -0.821 0.676
anova (GM_MEM_B1M)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 4.3400 2.1700 2 254.05 2.4332 0.089803 .
## Time 11.8930 11.8930 1 235.41 13.3353 0.000321 ***
## Group:Time 5.5615 2.7807 2 235.41 3.1180 0.046079 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(GM_MEM_B1M)
## # R2 for Mixed Models
##
## Conditional R2: 0.568
## Marginal R2: 0.039
parameters::standardise_parameters(GM_MEM_B1M)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------------------------
## (Intercept) | 0.03 | [-0.25, 0.30]
## Group [B_Controls] | -0.28 | [-0.61, 0.05]
## Group [C_Intervention] | -0.11 | [-0.45, 0.22]
## Time [D_M1_GM] | 0.03 | [-0.25, 0.30]
## Group [B_Controls] × Time [D_M1_GM] | 0.21 | [-0.12, 0.55]
## Group [C_Intervention] × Time [D_M1_GM] | 0.41 | [ 0.08, 0.75]
# BF
full_lmer <- lmer(GM_Score ~ Group + Time + (1|ID), data = GM_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.004456573
full_lmer <- lmer(GM_Score ~ Group + Time + (1|ID), data = GM_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 216.1675
full_lmer <- lmer(GM_Score ~ Group * Time + (1|ID), data = GM_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.01232158
GM_B3m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GM", "E_M3_GM")
GM_B3m_long <- GM_B3m %>%
pivot_longer(cols = c(A_PRE_GM, E_M3_GM),
names_to = "Time",
values_to = "GM_Score")
GM_MEM_B3m <- lmer(GM_Score ~ Group * Time + (1|ID), data = GM_B3m_long, REML = TRUE)
summary(GM_MEM_B3m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GM_Score ~ Group * Time + (1 | ID)
## Data: GM_B3m_long
##
## REML criterion at convergence: 1646.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.7180 -0.4970 0.1654 0.5496 2.3190
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 0.8785 0.9373
## Residual 1.1350 1.0653
## Number of obs: 477, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 4.260000 0.200671 403.736875 21.229
## GroupB_Controls -0.401509 0.243441 403.736875 -1.649
## GroupC_Intervention -0.162913 0.244575 403.736875 -0.666
## TimeE_M3_GM 0.005271 0.231407 241.291650 0.023
## GroupB_Controls:TimeE_M3_GM 0.360856 0.276705 237.855780 1.304
## GroupC_Intervention:TimeE_M3_GM 0.814283 0.282206 241.434829 2.885
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## GroupB_Controls 0.09986 .
## GroupC_Intervention 0.50572
## TimeE_M3_GM 0.98185
## GroupB_Controls:TimeE_M3_GM 0.19345
## GroupC_Intervention:TimeE_M3_GM 0.00426 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TE_M3_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TimeE_M3_GM -0.489 0.403 0.401
## GB_C:TE_M3_ 0.409 -0.496 -0.335 -0.836
## GC_I:TE_M3_ 0.401 -0.330 -0.489 -0.820 0.686
anova (GM_MEM_B3m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 8.4468 4.2234 2 259.12 3.7212 0.0255087 *
## Time 15.6813 15.6813 1 238.83 13.8166 0.0002511 ***
## Group:Time 10.4242 5.2121 2 238.17 4.5923 0.0110427 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(GM_MEM_B3m)
## # R2 for Mixed Models
##
## Conditional R2: 0.467
## Marginal R2: 0.054
parameters::standardise_parameters(GM_MEM_B3m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------------------------
## (Intercept) | 0.01 | [-0.26, 0.28]
## Group [B_Controls] | -0.28 | [-0.61, 0.05]
## Group [C_Intervention] | -0.11 | [-0.44, 0.22]
## Time [E_M3_GM] | 3.63e-03 | [-0.31, 0.32]
## Group [B_Controls] × Time [E_M3_GM] | 0.25 | [-0.13, 0.62]
## Group [C_Intervention] × Time [E_M3_GM] | 0.56 | [ 0.18, 0.94]
# BF
full_lmer <- lmer(GM_Score ~ Group + Time + (1|ID), data = GM_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.01142912
full_lmer <- lmer(GM_Score ~ Group + Time + (1|ID), data = GM_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 388.9084
full_lmer <- lmer(GM_Score ~ Group * Time + (1|ID), data = GM_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.0694849
# Mindset Training
GM_I_p <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GM", "B_POST_GM") %>%
filter(Group == "C_Intervention")
GM_I_long_p <- GM_I_p %>%
pivot_longer(cols = c(A_PRE_GM, B_POST_GM),
names_to = "Time",
values_to = "GM_Score")
GM_MEM_I_p <- lmer(GM_Score ~ Time + (1|ID), data = GM_I_long_p, REML = TRUE)
summary(GM_MEM_I_p)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GM_Score ~ Time + (1 | ID)
## Data: GM_I_long_p
##
## REML criterion at convergence: 677.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.7023 -0.4509 0.1065 0.4652 2.1963
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 1.2470 1.1167
## Residual 0.7763 0.8811
## Number of obs: 204, groups: ID, 103
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 4.0971 0.1402 147.4341 29.232 < 2e-16 ***
## TimeB_POST_GM 0.6839 0.1238 101.2984 5.526 2.55e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmB_POST_GM -0.435
anova (GM_MEM_I_p)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 23.709 23.709 1 101.3 30.539 2.55e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(GM_MEM_I_p)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ----------------------------------------------
## (Intercept) | -0.23 | [-0.42, -0.04]
## Time [B_POST_GM] | 0.47 | [ 0.30, 0.63]
# Psychoed
GM_P_p <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GM", "B_POST_GM") %>%
filter(Group == "B_Controls")
GM_P_long_p <- GM_P_p %>%
pivot_longer(cols = c(A_PRE_GM, B_POST_GM),
names_to = "Time",
values_to = "GM_Score")
GM_MEM_P_p <- lmer(GM_Score ~ Time + (1|ID), data = GM_P_long_p, REML = TRUE)
summary(GM_MEM_P_p)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GM_Score ~ Time + (1 | ID)
## Data: GM_P_long_p
##
## REML criterion at convergence: 684.4
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.33778 -0.45981 0.06417 0.50719 2.29531
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 1.5642 1.2507
## Residual 0.5738 0.7575
## Number of obs: 212, groups: ID, 106
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 3.8585 0.1420 136.7834 27.169 < 2e-16 ***
## TimeB_POST_GM 0.4906 0.1040 105.0000 4.715 7.47e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmB_POST_GM -0.366
anova (GM_MEM_P_p)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 12.755 12.755 1 105 22.23 7.468e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(GM_MEM_P_p)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------
## (Intercept) | -0.17 | [-0.36, 0.02]
## Time [B_POST_GM] | 0.33 | [ 0.19, 0.47]
# No-Training
GM_EC_p <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GM", "B_POST_GM") %>%
filter(Group == "A_ECs")
GM_EC_long_p <- GM_EC_p %>%
pivot_longer(cols = c(A_PRE_GM, B_POST_GM),
names_to = "Time",
values_to = "GM_Score")
GM_MEM_EC_p <- lmer(GM_Score ~ Time + (1|ID), data = GM_EC_long_p, REML = TRUE)
summary(GM_MEM_EC_p)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GM_Score ~ Time + (1 | ID)
## Data: GM_EC_long_p
##
## REML criterion at convergence: 302.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.78488 -0.22845 -0.00479 0.24433 2.32797
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 1.7376 1.3182
## Residual 0.3665 0.6054
## Number of obs: 100, groups: ID, 50
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 4.2600 0.2051 58.2658 20.77 <2e-16 ***
## TimeB_POST_GM -0.0400 0.1211 49.0000 -0.33 0.743
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TmB_POST_GM -0.295
anova (GM_MEM_EC_p)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 0.04 0.04 1 49 0.1091 0.7425
parameters::standardise_parameters(GM_MEM_EC_p)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------
## (Intercept) | 0.01 | [-0.27, 0.30]
## Time [B_POST_GM] | -0.03 | [-0.19, 0.14]
# BF
full_lmer <- lmer(GM_Score ~ Time + (1|ID), data = GM_I_long_p, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 15556.71
full_lmer <- lmer(GM_Score ~ Time + (1|ID), data = GM_P_long_p, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 470.2298
full_lmer <- lmer(GM_Score ~ Time + (1|ID), data = GM_EC_long_p, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.03192482
m.ef_GM_p<-emmeans(GM_MEM_BP, "Time", "Group")
eff_size(m.ef_GM_p, sigma = sigma(GM_MEM_BP), edf = df.residual(GM_MEM_BP))
## Group = A_ECs:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_GM - B_POST_GM 0.051 0.200 341 -0.342 0.444
##
## Group = B_Controls:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_GM - B_POST_GM -0.626 0.139 341 -0.899 -0.353
##
## Group = C_Intervention:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_GM - B_POST_GM -0.873 0.143 341 -1.154 -0.591
##
## sigma used for effect sizes: 0.7836
## Degrees-of-freedom method: inherited from kenward-roger when re-gridding
## Confidence level used: 0.95
# Intervention
GM_I_3m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GM", "E_M3_GM") %>%
filter(Group == "C_Intervention")
GM_I_long_3m <- GM_I_3m %>%
pivot_longer(cols = c("A_PRE_GM", "E_M3_GM"),
names_to = "Time",
values_to = "GM_Score")
GM_MEM_I_3m <- lmer(GM_Score ~ Time + (1|ID), data = GM_I_long_3m, REML = TRUE)
summary(GM_MEM_I_3m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GM_Score ~ Time + (1 | ID)
## Data: GM_I_long_3m
##
## REML criterion at convergence: 615.5
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.4790 -0.4993 0.2027 0.5207 1.8872
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 0.7312 0.8551
## Residual 1.0206 1.0103
## Number of obs: 185, groups: ID, 103
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 4.0971 0.1304 159.2776 31.416 < 2e-16 ***
## TimeE_M3_GM 0.8184 0.1530 91.4036 5.348 6.51e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TimeE_M3_GM -0.497
anova (GM_MEM_I_3m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 29.195 29.195 1 91.404 28.605 6.512e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(GM_MEM_I_3m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------
## (Intercept) | -0.25 | [-0.44, -0.07]
## Time [E_M3_GM] | 0.59 | [ 0.37, 0.81]
# Psychoeducation
GM_P_3m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GM", "E_M3_GM") %>%
filter(Group == "B_Controls")
GM_P_long_3m <- GM_P_3m %>%
pivot_longer(cols = c("A_PRE_GM", "E_M3_GM"),
names_to = "Time",
values_to = "GM_Score")
GM_MEM_P_3m <- lmer(GM_Score ~ Time + (1|ID), data = GM_P_long_3m, REML = TRUE)
summary(GM_MEM_P_3m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GM_Score ~ Time + (1 | ID)
## Data: GM_P_long_3m
##
## REML criterion at convergence: 707.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.6626 -0.4812 0.1043 0.5138 2.2857
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 0.9689 0.9843
## Residual 1.1756 1.0842
## Number of obs: 202, groups: ID, 106
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 3.8585 0.1422 167.7801 27.127 <2e-16 ***
## TimeE_M3_GM 0.3652 0.1545 99.5315 2.365 0.02 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TimeE_M3_GM -0.505
anova (GM_MEM_P_3m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 6.5726 6.5726 1 99.531 5.5909 0.01999 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(GM_MEM_P_3m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -------------------------------------------
## (Intercept) | -0.13 | [-0.32, 0.06]
## Time [E_M3_GM] | 0.25 | [ 0.04, 0.45]
# No-Training
GM_EC_3m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GM", "E_M3_GM") %>%
filter(Group == "A_ECs")
GM_EC_long_3m <- GM_EC_3m %>%
pivot_longer(cols = c(A_PRE_GM, E_M3_GM),
names_to = "Time",
values_to = "GM_Score")
GM_MEM_EC_3m <- lmer(GM_Score ~ Time + (1|ID), data = GM_EC_long_3m, REML = TRUE)
summary(GM_MEM_EC_3m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GM_Score ~ Time + (1 | ID)
## Data: GM_EC_long_3m
##
## REML criterion at convergence: 321.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.4781 -0.5593 0.1789 0.6026 1.9471
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 0.9847 0.9923
## Residual 1.2793 1.1311
## Number of obs: 90, groups: ID, 50
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 4.260000 0.212790 76.480897 20.020 <2e-16 ***
## TimeE_M3_GM 0.005223 0.245662 45.343275 0.021 0.983
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## TimeE_M3_GM -0.489
anova (GM_MEM_EC_3m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Time 0.00057825 0.00057825 1 45.343 5e-04 0.9831
parameters::standardise_parameters(GM_MEM_EC_3m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -------------------------------------------
## (Intercept) | 2.96e-03 | [-0.28, 0.28]
## Time [E_M3_GM] | 3.47e-03 | [-0.32, 0.33]
# BF
full_lmer <- lmer(GM_Score ~ Time + (1|ID), data = GM_I_long_3m, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 6756.241
full_lmer <- lmer(GM_Score ~ Time + (1|ID), data = GM_P_long_3m, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.4294801
full_lmer <- lmer(GM_Score ~ Time + (1|ID), data = GM_EC_long_3m, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.06457136
m.ef_GM_3m<-emmeans(GM_MEM_B3m, "Time", "Group")
eff_size(m.ef_GM_3m, sigma = sigma(GM_MEM_B3m), edf = df.residual(GM_MEM_B3m))
## Group = A_ECs:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_GM - E_M3_GM -0.00495 0.217 402 -0.432 0.4223
##
## Group = B_Controls:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_GM - E_M3_GM -0.34367 0.143 402 -0.625 -0.0628
##
## Group = C_Intervention:
## contrast effect.size SE df lower.CL upper.CL
## A_PRE_GM - E_M3_GM -0.76929 0.154 402 -1.072 -0.4670
##
## sigma used for effect sizes: 1.065
## Degrees-of-freedom method: inherited from kenward-roger when re-gridding
## Confidence level used: 0.95
# Intervention vs Psychoeducation
GM_IP_p <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GM", "B_POST_GM") %>%
filter(Group != "A_ECs")
GM_IP_long_p <- GM_IP_p %>%
pivot_longer(cols = c(A_PRE_GM, B_POST_GM),
names_to = "Time",
values_to = "GM_Score")
GM_MEM_IP_p <- lmer(GM_Score ~ Group * Time + (1|ID), data = GM_IP_long_p, REML = TRUE)
summary(GM_MEM_IP_p)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GM_Score ~ Group * Time + (1 | ID)
## Data: GM_IP_long_p
##
## REML criterion at convergence: 1364.2
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.85151 -0.45247 0.05676 0.50974 2.40992
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 1.408 1.1865
## Residual 0.673 0.8203
## Number of obs: 416, groups: ID, 209
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 3.8585 0.1401 283.7154 27.539 < 2e-16
## GroupC_Intervention 0.2386 0.1996 283.7154 1.195 0.233
## TimeB_POST_GM 0.4906 0.1127 205.5917 4.353 2.11e-05
## GroupC_Intervention:TimeB_POST_GM 0.1932 0.1612 206.1468 1.199 0.232
##
## (Intercept) ***
## GroupC_Intervention
## TimeB_POST_GM ***
## GroupC_Intervention:TimeB_POST_GM
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpC_I TB_POS
## GrpC_Intrvn -0.702
## TmB_POST_GM -0.402 0.282
## GC_I:TB_POS 0.281 -0.400 -0.699
anova (GM_MEM_IP_p)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 2.261 2.261 1 207.51 3.3596 0.06825 .
## Time 35.721 35.721 1 206.15 53.0797 6.681e-12 ***
## Group:Time 0.967 0.967 1 206.15 1.4370 0.23200
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(GM_MEM_IP_p)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## -----------------------------------------------------------------------
## (Intercept) | -0.28 | [-0.46, -0.09]
## Group [C_Intervention] | 0.16 | [-0.10, 0.43]
## Time [B_POST_GM] | 0.33 | [ 0.18, 0.48]
## Group [C_Intervention] × Time [B_POST_GM] | 0.13 | [-0.08, 0.34]
# BF
full_lmer <- lmer(GM_Score ~ Group * Time + (1|ID), data = GM_IP_long_p, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.04062739
# Intervention vs Psychoeducation
GM_IP_3m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_GM", "E_M3_GM") %>%
filter(Group != "A_ECs")
GM_IP_long_3m <- GM_IP_3m %>%
pivot_longer(cols = c(A_PRE_GM, E_M3_GM),
names_to = "Time",
values_to = "GM_Score")
GM_MEM_B3M_IP <- lmer(GM_Score ~ Group * Time + (1|ID), data = GM_IP_long_3m, REML = TRUE)
summary(GM_MEM_B3M_IP)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: GM_Score ~ Group * Time + (1 | ID)
## Data: GM_IP_long_3m
##
## REML criterion at convergence: 1324.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.7580 -0.5043 0.1588 0.5326 2.3531
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 0.8533 0.9237
## Residual 1.1023 1.0499
## Number of obs: 387, groups: ID, 209
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 3.8585 0.1358 327.2478 28.408 <2e-16
## GroupC_Intervention 0.2386 0.1935 327.2478 1.233 0.2184
## TimeE_M3_GM 0.3661 0.1495 186.7244 2.449 0.0153
## GroupC_Intervention:TimeE_M3_GM 0.4534 0.2184 191.7252 2.076 0.0392
##
## (Intercept) ***
## GroupC_Intervention
## TimeE_M3_GM *
## GroupC_Intervention:TimeE_M3_GM *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpC_I TE_M3_
## GrpC_Intrvn -0.702
## TimeE_M3_GM -0.512 0.359
## GC_I:TE_M3_ 0.351 -0.499 -0.685
anova (GM_MEM_B3M_IP)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 8.446 8.446 1 207.20 7.6623 0.00615 **
## Time 32.491 32.491 1 191.72 29.4761 1.699e-07 ***
## Group:Time 4.752 4.752 1 191.72 4.3108 0.03921 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(GM_MEM_B3M_IP)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ---------------------------------------------------------------------
## (Intercept) | -0.26 | [-0.45, -0.08]
## Group [C_Intervention] | 0.17 | [-0.10, 0.43]
## Time [E_M3_GM] | 0.25 | [ 0.05, 0.46]
## Group [C_Intervention] × Time [E_M3_GM] | 0.31 | [ 0.02, 0.61]
# BF
full_lmer <- lmer(GM_Score ~ Group * Time + (1|ID), data = GM_IP_long_3m, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.2344499
FI_alltimepoints <- Full_data %>%
dplyr::select("A_PRE_FI_total", "C_W1_FI_total", "D_M1_FI_total", "E_M3_FI_total", "Group") %>%
pivot_longer(cols = c(A_PRE_FI_total, C_W1_FI_total, D_M1_FI_total, E_M3_FI_total),
names_to = "Time",
values_to = "FI_Score")
f <- FI_alltimepoints %>%
mutate(Time=case_when(
Time == "A_PRE_FI_total" ~ "Baseline",
Time == "B_POST_FI_total" ~ "Post",
Time == "C_W1_FI_total" ~ "1 Week",
Time == "D_M1_FI_total" ~ "1 Month",
Time == "E_M3_FI_total" ~ "3 Months"
)) %>%
mutate(Time=factor(Time, levels=c("Baseline", "Post", "1 Week", "1 Month", "3 Months"))) %>%
mutate(Group=case_when(
Group == "A_ECs" ~ "\nNo-Training",
Group == "B_Controls" ~ "\nPsychoeducation",
Group == "C_Intervention" ~ "\nUncertainty-Mindsets\nTraining")) %>%
mutate(Group=factor(Group, levels=c("\nNo-Training", "\nPsychoeducation", "\nUncertainty-Mindsets\nTraining"))) %>%
ggplot(aes(x = Time, y = FI_Score, color = Group, fill = Group, group = Group)) +
#stat_summary(fun = mean, geom = "line") + # Calculate and plot the mean as a line
stat_summary(fun = mean, geom = "point") + # Add points at the mean values
scale_y_continuous(name = "Functional Impairment") +
theme_bw() +
theme(legend.position = "none") +
geom_smooth(se = TRUE, level = 0.95, alpha = 0.25)
FI_gg <- ggMarginal(f,groupColour = TRUE, groupFill = TRUE, type = "density")
## Warning: Removed 76 rows containing non-finite outside the scale range
## (`stat_summary()`).
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning: Removed 76 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 9.2851e-16
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 9.2851e-16
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 7.9138e-16
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 7.9138e-16
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 1.0148e-15
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 1.0148e-15
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning: Removed 76 rows containing non-finite outside the scale range
## (`stat_summary()`).
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
## Warning: Removed 76 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 9.2851e-16
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 9.2851e-16
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 7.9138e-16
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 7.9138e-16
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : reciprocal condition number 1.0148e-15
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric = parametric,
## : There are other near singularities as well. 1
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
## 0.985
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius
## 2.015
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
## number 1.0148e-15
## Warning in predLoess(object$y, object$x, newx = if (is.null(newdata)) object$x
## else if (is.data.frame(newdata))
## as.matrix(model.frame(delete.response(terms(object)), : There are other near
## singularities as well. 1
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x < range[1], value =
## "Baseline"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x > range[2], value = "1
## Week"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x < range[1], value =
## "Baseline"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x > range[2], value = "1
## Week"): NAs introduced by coercion
## Warning: Removed 12 rows containing non-finite outside the scale range
## (`stat_density()`).
## Removed 12 rows containing non-finite outside the scale range
## (`stat_density()`).
## Warning: No shared levels found between `names(values)` of the manual scale and the
## data's colour values.
## Warning: No shared levels found between `names(values)` of the manual scale and the
## data's fill values.
FI_gg
FI_B1W <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_FI_total", "C_W1_FI_total")
FI_B1W_long <- FI_B1W %>%
pivot_longer(cols = c(A_PRE_FI_total, C_W1_FI_total),
names_to = "Time",
values_to = "FI_Score")
FI_MEM_B1W <- lmer(FI_Score ~ Group * Time + (1|ID), data = FI_B1W_long, REML = TRUE)
summary(FI_MEM_B1W)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: FI_Score ~ Group * Time + (1 | ID)
## Data: FI_B1W_long
##
## REML criterion at convergence: 2740.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.86590 -0.50210 -0.00798 0.48671 2.80124
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 9.039 3.007
## Residual 6.577 2.565
## Number of obs: 510, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 9.86000 0.55886 380.24977 17.643
## GroupB_Controls 0.16830 0.67797 380.24977 0.248
## GroupC_Intervention 0.61573 0.68113 380.24977 0.904
## TimeC_W1_FI_total 0.09842 0.52127 252.70546 0.189
## GroupB_Controls:TimeC_W1_FI_total -0.30400 0.63140 252.38770 -0.481
## GroupC_Intervention:TimeC_W1_FI_total -1.05347 0.63439 252.40409 -1.661
## Pr(>|t|)
## (Intercept) <2e-16 ***
## GroupB_Controls 0.804
## GroupC_Intervention 0.367
## TimeC_W1_FI_total 0.850
## GroupB_Controls:TimeC_W1_FI_total 0.631
## GroupC_Intervention:TimeC_W1_FI_total 0.098 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TC_W1_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmC_W1_FI_t -0.452 0.372 0.370
## GB_C:TC_W1_ 0.373 -0.452 -0.306 -0.826
## GC_I:TC_W1_ 0.371 -0.306 -0.452 -0.822 0.678
anova (FI_MEM_B1W)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 0.2043 0.1022 2 256.87 0.0155 0.9846
## Time 14.0165 14.0165 1 252.24 2.1312 0.1456
## Group:Time 23.2052 11.6026 2 252.13 1.7642 0.1734
parameters::standardise_parameters(FI_MEM_B1W)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------------------------------
## (Intercept) | -0.03 | [-0.30, 0.25]
## Group [B_Controls] | 0.04 | [-0.29, 0.38]
## Group [C_Intervention] | 0.16 | [-0.18, 0.49]
## Time [C_W1_FI_total] | 0.02 | [-0.23, 0.28]
## Group [B_Controls] × Time [C_W1_FI_total] | -0.08 | [-0.39, 0.24]
## Group [C_Intervention] × Time [C_W1_FI_total] | -0.27 | [-0.58, 0.05]
# BF
full_lmer <- lmer(FI_Score ~ Group + Time + (1|ID), data = FI_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.003390009
full_lmer <- lmer(FI_Score ~ Group + Time + (1|ID), data = FI_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.1681013
full_lmer <- lmer(FI_Score ~ Group * Time + (1|ID), data = FI_B1W_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.02112748
FI_B1M <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_FI_total", "D_M1_FI_total")
FI_B1M_long <- FI_B1M %>%
pivot_longer(cols = c(A_PRE_FI_total, D_M1_FI_total),
names_to = "Time",
values_to = "FI_Score")
FI_MEM_B1M <- lmer(FI_Score ~ Group * Time + (1|ID), data = FI_B1M_long, REML = TRUE)
summary(FI_MEM_B1M)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: FI_Score ~ Group * Time + (1 | ID)
## Data: FI_B1M_long
##
## REML criterion at convergence: 2627.3
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.39593 -0.49332 -0.00673 0.48809 2.50102
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 10.482 3.238
## Residual 5.891 2.427
## Number of obs: 489, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 9.8600 0.5722 351.6690 17.230
## GroupB_Controls 0.1683 0.6942 351.6690 0.242
## GroupC_Intervention 0.6157 0.6974 351.6690 0.883
## TimeD_M1_FI_total -0.1205 0.5119 237.2371 -0.235
## GroupB_Controls:TimeD_M1_FI_total -0.5991 0.6203 237.0764 -0.966
## GroupC_Intervention:TimeD_M1_FI_total -0.9938 0.6226 236.9204 -1.596
## Pr(>|t|)
## (Intercept) <2e-16 ***
## GroupB_Controls 0.809
## GroupC_Intervention 0.378
## TimeD_M1_FI_total 0.814
## GroupB_Controls:TimeD_M1_FI_total 0.335
## GroupC_Intervention:TimeD_M1_FI_total 0.112
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TD_M1_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmD_M1_FI_t -0.402 0.332 0.330
## GB_C:TD_M1_ 0.332 -0.403 -0.272 -0.825
## GC_I:TD_M1_ 0.331 -0.273 -0.403 -0.822 0.678
anova (FI_MEM_B1M)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 1.403 0.702 2 256.73 0.1191 0.887779
## Time 44.086 44.086 1 236.88 7.4834 0.006698 **
## Group:Time 15.160 7.580 2 236.79 1.2867 0.278109
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(FI_MEM_B1M)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------------------------------
## (Intercept) | 0.01 | [-0.27, 0.29]
## Group [B_Controls] | 0.04 | [-0.29, 0.38]
## Group [C_Intervention] | 0.15 | [-0.19, 0.49]
## Time [D_M1_FI_total] | -0.03 | [-0.28, 0.22]
## Group [B_Controls] × Time [D_M1_FI_total] | -0.15 | [-0.45, 0.15]
## Group [C_Intervention] × Time [D_M1_FI_total] | -0.25 | [-0.55, 0.06]
# BF
full_lmer <- lmer(FI_Score ~ Group + Time + (1|ID), data = FI_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.004394219
full_lmer <- lmer(FI_Score ~ Group + Time + (1|ID), data = FI_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 7.371853
full_lmer <- lmer(FI_Score ~ Group * Time + (1|ID), data = FI_B1M_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.01319748
FI_B3m <- Full_data %>%
dplyr::select("ID", "Group", "A_PRE_FI_total", "E_M3_FI_total")
FI_B3m_long <- FI_B3m %>%
pivot_longer(cols = c(A_PRE_FI_total, E_M3_FI_total),
names_to = "Time",
values_to = "FI_Score")
FI_MEM_B3m <- lmer(FI_Score ~ Group * Time + (1|ID), data = FI_B3m_long, REML = TRUE)
summary(FI_MEM_B3m)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: FI_Score ~ Group * Time + (1 | ID)
## Data: FI_B3m_long
##
## REML criterion at convergence: 2608.7
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.63555 -0.56612 0.01905 0.48563 2.65479
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 8.014 2.831
## Residual 7.773 2.788
## Number of obs: 479, groups: ID, 259
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 9.8600 0.5619 383.4172 17.547
## GroupB_Controls 0.1683 0.6817 383.4172 0.247
## GroupC_Intervention 0.6157 0.6849 383.4172 0.899
## TimeE_M3_FI_total -0.5188 0.6079 236.4510 -0.853
## GroupB_Controls:TimeE_M3_FI_total -0.4475 0.7256 233.1182 -0.617
## GroupC_Intervention:TimeE_M3_FI_total -0.8289 0.7402 236.2603 -1.120
## Pr(>|t|)
## (Intercept) <2e-16 ***
## GroupB_Controls 0.805
## GroupC_Intervention 0.369
## TimeE_M3_FI_total 0.394
## GroupB_Controls:TimeE_M3_FI_total 0.538
## GroupC_Intervention:TimeE_M3_FI_total 0.264
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TE_M3_ GB_C:T
## GrpB_Cntrls -0.824
## GrpC_Intrvn -0.820 0.676
## TmE_M3_FI_t -0.455 0.375 0.373
## GB_C:TE_M3_ 0.381 -0.463 -0.313 -0.838
## GC_I:TE_M3_ 0.374 -0.308 -0.456 -0.821 0.688
anova (FI_MEM_B3m)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 2.278 1.139 2 255.94 0.1465 0.8637988
## Time 88.492 88.492 1 233.81 11.3839 0.0008671 ***
## Group:Time 10.097 5.048 2 233.09 0.6494 0.5232831
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
parameters::standardise_parameters(FI_MEM_B3m)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## --------------------------------------------------------------------------
## (Intercept) | 0.04 | [-0.24, 0.32]
## Group [B_Controls] | 0.04 | [-0.29, 0.38]
## Group [C_Intervention] | 0.15 | [-0.18, 0.49]
## Time [E_M3_FI_total] | -0.13 | [-0.43, 0.17]
## Group [B_Controls] × Time [E_M3_FI_total] | -0.11 | [-0.47, 0.25]
## Group [C_Intervention] × Time [E_M3_FI_total] | -0.21 | [-0.57, 0.16]
# BF
full_lmer <- lmer(FI_Score ~ Group + Time + (1|ID), data = FI_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.00428979
full_lmer <- lmer(FI_Score ~ Group + Time + (1|ID), data = FI_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 58.42044
full_lmer <- lmer(FI_Score ~ Group * Time + (1|ID), data = FI_B3m_long, REML = TRUE)
null_lmer <- update(full_lmer, formula = ~ . -Time:Group)
BF_BIC <- exp((BIC(null_lmer) - BIC(full_lmer))/2)
BF_BIC
## [1] 0.009783425
# 1 week
moderation_GM_PHQ_1W <- lm(PHQ_B1W_change ~ Group*A_PRE_GM, data = Full_data)
anova(moderation_GM_PHQ_1W)
## Analysis of Variance Table
##
## Response: PHQ_B1W_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 58.5 29.234 1.4560 0.2352
## A_PRE_GM 1 6.3 6.310 0.3143 0.5756
## Group:A_PRE_GM 2 84.0 42.016 2.0926 0.1256
## Residuals 245 4919.1 20.078
# 1 month
moderation_GM_PHQ_1M <- lm(PHQ_B1M_change ~ Group*A_PRE_GM, data = Full_data)
anova(moderation_GM_PHQ_1M)
## Analysis of Variance Table
##
## Response: PHQ_B1M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 295.9 147.948 4.8242 0.008894 **
## A_PRE_GM 1 23.5 23.462 0.7650 0.382702
## Group:A_PRE_GM 2 33.6 16.824 0.5486 0.578536
## Residuals 222 6808.2 30.668
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# 3 months
moderation_GM_PHQ_3M <- lm(PHQ_B3M_change ~ Group*A_PRE_GM, data = Full_data)
anova(moderation_GM_PHQ_3M)
## Analysis of Variance Table
##
## Response: PHQ_B3M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 151.8 75.924 2.1474 0.1193
## A_PRE_GM 1 46.8 46.807 1.3239 0.2512
## Group:A_PRE_GM 2 15.7 7.857 0.2222 0.8009
## Residuals 213 7530.9 35.356
# 1 week
full_lm = lm(PHQ_B1W_change ~ Group*A_PRE_GM, Full_data)
null_lm = lm(PHQ_B1W_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.002468338
# 1 month
full_lm = lm(PHQ_B1M_change ~ Group*A_PRE_GM, Full_data)
null_lm = lm(PHQ_B1M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0007527954
# 3 months
full_lm = lm(PHQ_B3M_change ~ Group*A_PRE_GM, Full_data)
null_lm = lm(PHQ_B3M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0007629595
# 1 week
moderation_GM_GAD_1W <- lm(GAD_B1W_change ~ Group*A_PRE_GM, data = Full_data)
anova(moderation_GM_GAD_1W)
## Analysis of Variance Table
##
## Response: GAD_B1W_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 54.3 27.131 1.4683 0.2323
## A_PRE_GM 1 17.3 17.305 0.9366 0.3341
## Group:A_PRE_GM 2 83.6 41.801 2.2623 0.1063
## Residuals 245 4527.0 18.478
# 1 month
moderation_GM_GAD_1M <- lm(GAD_B1M_change ~ Group*A_PRE_GM, data = Full_data)
anova(moderation_GM_GAD_1M)
## Analysis of Variance Table
##
## Response: GAD_B1M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 294.1 147.030 5.7385 0.003718 **
## A_PRE_GM 1 0.1 0.092 0.0036 0.952337
## Group:A_PRE_GM 2 33.1 16.547 0.6458 0.525220
## Residuals 221 5662.3 25.621
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# 3 months
moderation_GM_GAD_3M <- lm(GAD_B3M_change ~ Group*A_PRE_GM, data = Full_data)
anova(moderation_GM_GAD_3M)
## Analysis of Variance Table
##
## Response: GAD_B3M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 149.0 74.480 2.4099 0.09227 .
## A_PRE_GM 1 38.9 38.933 1.2597 0.26296
## Group:A_PRE_GM 2 65.3 32.648 1.0564 0.34952
## Residuals 213 6582.8 30.905
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# 1 week
full_lm = lm(GAD_B1W_change ~ Group*A_PRE_GM, Full_data)
null_lm = lm(GAD_B1W_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.003999946
# 1 month
full_lm = lm(GAD_B1M_change ~ Group*A_PRE_GM, Full_data)
null_lm = lm(GAD_B1M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.000567553
# 3 months
full_lm = lm(GAD_B3M_change ~ Group*A_PRE_GM, Full_data)
null_lm = lm(GAD_B3M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.001723461
# Post
moderation_GM_Mood_BP <- lm(negaff_BP_change ~ Group*A_PRE_GM, data = Full_data)
anova(moderation_GM_Mood_BP)
## Analysis of Variance Table
##
## Response: negaff_BP_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 29097 14548.3 14.0609 1.625e-06 ***
## A_PRE_GM 1 0 0.0 0.0000 0.9988
## Group:A_PRE_GM 2 1150 575.1 0.5558 0.5743
## Residuals 252 260736 1034.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# 1 week
moderation_GM_Mood_1W <- lm(negaff_B1W_change ~ Group*A_PRE_GM, data = Full_data)
anova(moderation_GM_Mood_1W)
## Analysis of Variance Table
##
## Response: negaff_B1W_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 2952 1476.0 0.6511 0.5224
## A_PRE_GM 1 1516 1515.6 0.6686 0.4143
## Group:A_PRE_GM 2 449 224.5 0.0990 0.9057
## Residuals 244 553135 2266.9
# 1 month
moderation_GM_Mood_1M <- lm(negaff_B1M_change ~ Group*A_PRE_GM, data = Full_data)
anova(moderation_GM_Mood_1M)
## Analysis of Variance Table
##
## Response: negaff_B1M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 7881 3940.5 1.6652 0.1915
## A_PRE_GM 1 904 904.4 0.3822 0.5371
## Group:A_PRE_GM 2 2246 1122.9 0.4745 0.6228
## Residuals 222 525329 2366.3
# 3 months
moderation_GM_Mood_3M <- lm(negaff_B3M_change ~ Group*A_PRE_GM, data = Full_data)
anova(moderation_GM_Mood_3M)
## Analysis of Variance Table
##
## Response: negaff_B3M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 16030 8014.8 3.2114 0.04226 *
## A_PRE_GM 1 31 31.1 0.0124 0.91127
## Group:A_PRE_GM 2 3619 1809.5 0.7250 0.48550
## Residuals 213 531596 2495.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# post
full_lm = lm(negaff_BP_change ~ Group*A_PRE_GM, Full_data)
null_lm = lm(negaff_BP_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0004257513
# 1 week
full_lm = lm(negaff_B1W_change ~ Group*A_PRE_GM, Full_data)
null_lm = lm(negaff_B1W_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0003940627
# 1 month
full_lm = lm(negaff_B1M_change ~ Group*A_PRE_GM, Full_data)
null_lm = lm(negaff_B1M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0005742467
# 3 months
full_lm = lm(negaff_B3M_change ~ Group*A_PRE_GM, Full_data)
null_lm = lm(negaff_B3M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0006527475
# 1 week
moderation_RTQ_PHQ_1W <- lm(PHQ_B1W_change ~ Group*A_PRE_RTQ_total, data = Full_data)
anova(moderation_RTQ_PHQ_1W)
## Analysis of Variance Table
##
## Response: PHQ_B1W_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 58.5 29.234 1.4662 0.23282
## A_PRE_RTQ_total 1 92.9 92.920 4.6604 0.03184 *
## Group:A_PRE_RTQ_total 2 31.7 15.827 0.7938 0.45328
## Residuals 245 4884.9 19.938
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# 1 month
moderation_RTQ_PHQ_1M <- lm(PHQ_B1M_change ~ Group*A_PRE_RTQ_total, data = Full_data)
anova(moderation_RTQ_PHQ_1M)
## Analysis of Variance Table
##
## Response: PHQ_B1M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 295.9 147.948 4.8649 0.008555 **
## A_PRE_RTQ_total 1 97.6 97.577 3.2085 0.074617 .
## Group:A_PRE_RTQ_total 2 16.4 8.196 0.2695 0.764012
## Residuals 222 6751.4 30.412
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# 3 months
moderation_RTQ_PHQ_3M <- lm(PHQ_B3M_change ~ Group*A_PRE_RTQ_total, data = Full_data)
anova(moderation_RTQ_PHQ_3M)
## Analysis of Variance Table
##
## Response: PHQ_B3M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 151.8 75.924 2.1502 0.1190
## A_PRE_RTQ_total 1 38.0 38.000 1.0762 0.3007
## Group:A_PRE_RTQ_total 2 34.3 17.131 0.4852 0.6163
## Residuals 213 7521.1 35.311
# 1 week
full_lm = lm(PHQ_B1W_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(PHQ_B1W_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.005929507
# 1 month
full_lm = lm(PHQ_B1M_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(PHQ_B1M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.001958312
# 3 months
full_lm = lm(PHQ_B3M_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(PHQ_B3M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0008791313
# 1 week
moderation_RTQ_GAD_1W <- lm(GAD_B1W_change ~ Group*A_PRE_RTQ_total, data = Full_data)
anova(moderation_RTQ_GAD_1W)
## Analysis of Variance Table
##
## Response: GAD_B1W_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 54.3 27.1311 1.4475 0.2372
## A_PRE_RTQ_total 1 26.0 25.9915 1.3867 0.2401
## Group:A_PRE_RTQ_total 2 9.9 4.9634 0.2648 0.7676
## Residuals 245 4592.0 18.7428
# 1 month
moderation_RTQ_GAD_1M <- lm(GAD_B1M_change ~ Group*A_PRE_RTQ_total, data = Full_data)
anova(moderation_RTQ_GAD_1M)
## Analysis of Variance Table
##
## Response: GAD_B1M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 294.1 147.030 5.7782 0.003581 **
## A_PRE_RTQ_total 1 57.5 57.536 2.2611 0.134084
## Group:A_PRE_RTQ_total 2 14.5 7.251 0.2850 0.752326
## Residuals 221 5623.5 25.446
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# 3 months
moderation_RTQ_GAD_3M <- lm(GAD_B3M_change ~ Group*A_PRE_RTQ_total, data = Full_data)
anova(moderation_RTQ_GAD_3M)
## Analysis of Variance Table
##
## Response: GAD_B3M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 149.0 74.480 2.3835 0.09468 .
## A_PRE_RTQ_total 1 1.8 1.792 0.0574 0.81096
## Group:A_PRE_RTQ_total 2 29.5 14.726 0.4713 0.62487
## Residuals 213 6655.8 31.248
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# 1 week
full_lm = lm(GAD_B1W_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(GAD_B1W_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0006685862
# 1 month
full_lm = lm(GAD_B1M_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(GAD_B1M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.001239923
# 3 months
full_lm = lm(GAD_B3M_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(GAD_B3M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0005152816
# Post
moderation_RTQ_mood_BP <- lm(negaff_BP_change ~ Group*A_PRE_RTQ_total, data = Full_data)
anova(moderation_RTQ_mood_BP)
## Analysis of Variance Table
##
## Response: negaff_BP_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 29097 14548.3 14.5373 1.059e-06 ***
## A_PRE_RTQ_total 1 9445 9445.1 9.4379 0.002359 **
## Group:A_PRE_RTQ_total 2 250 124.8 0.1247 0.882792
## Residuals 252 252191 1000.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# 1 week
moderation_RTQ_mood_1W <- lm(negaff_B1W_change ~ Group*A_PRE_RTQ_total, data = Full_data)
anova(moderation_RTQ_mood_1W)
## Analysis of Variance Table
##
## Response: negaff_B1W_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 2952 1476.00 0.6497 0.5231
## A_PRE_RTQ_total 1 44 44.33 0.0195 0.8890
## Group:A_PRE_RTQ_total 2 728 363.87 0.1602 0.8521
## Residuals 244 554328 2271.83
# 1 month
moderation_RTQ_mood_1M <- lm(negaff_B1M_change ~ Group*A_PRE_RTQ_total, data = Full_data)
anova(moderation_RTQ_mood_1M)
## Analysis of Variance Table
##
## Response: negaff_B1M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 7881 3940.5 1.6563 0.1932
## A_PRE_RTQ_total 1 216 215.7 0.0907 0.7636
## Group:A_PRE_RTQ_total 2 104 52.0 0.0219 0.9784
## Residuals 222 528159 2379.1
# 3 months
moderation_RTQ_mood_3M <- lm(negaff_B3M_change ~ Group*A_PRE_RTQ_total, data = Full_data)
anova(moderation_RTQ_mood_3M)
## Analysis of Variance Table
##
## Response: negaff_B3M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 16030 8014.8 3.2606 0.04029 *
## A_PRE_RTQ_total 1 1634 1633.5 0.6645 0.41587
## Group:A_PRE_RTQ_total 2 10041 5020.7 2.0425 0.13223
## Residuals 213 523572 2458.1
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# post
full_lm = lm(negaff_BP_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(negaff_BP_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.03132396
# 1 week
full_lm = lm(negaff_B1W_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(negaff_B1W_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0003010566
# 1 month
full_lm = lm(negaff_B1M_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(negaff_B1M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0003112151
# 3 months
full_lm = lm(negaff_B3M_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(negaff_B3M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.003452178
# 1 week
moderation_ERQ_PHQ_1W <- lm(PHQ_B1W_change ~ Group*A_PRE_ERQ_total, data = Full_data)
anova(moderation_ERQ_PHQ_1W)
## Analysis of Variance Table
##
## Response: PHQ_B1W_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 58.5 29.2338 1.4353 0.2400
## A_PRE_ERQ_total 1 0.0 0.0003 0.0000 0.9969
## Group:A_PRE_ERQ_total 2 19.5 9.7690 0.4796 0.6196
## Residuals 245 4989.9 20.3671
# 1 month
moderation_ERQ_PHQ_1M <- lm(PHQ_B1M_change ~ Group*A_PRE_ERQ_total, data = Full_data)
anova(moderation_ERQ_PHQ_1M)
## Analysis of Variance Table
##
## Response: PHQ_B1M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 295.9 147.948 4.8384 0.008774 **
## A_PRE_ERQ_total 1 0.4 0.373 0.0122 0.912153
## Group:A_PRE_ERQ_total 2 76.7 38.366 1.2547 0.287171
## Residuals 222 6788.2 30.578
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# 3 months
moderation_ERQ_PHQ_3M <- lm(PHQ_B3M_change ~ Group*A_PRE_ERQ_total, data = Full_data)
anova(moderation_ERQ_PHQ_3M)
## Analysis of Variance Table
##
## Response: PHQ_B3M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 151.8 75.924 2.1403 0.1201
## A_PRE_ERQ_total 1 9.5 9.510 0.2681 0.6052
## Group:A_PRE_ERQ_total 2 28.0 13.978 0.3940 0.6748
## Residuals 213 7555.9 35.474
# 1 week
full_lm = lm(PHQ_B1W_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(PHQ_B1W_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.005929507
# 1 month
full_lm = lm(PHQ_B1M_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(PHQ_B1M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.001958312
# 3 months
full_lm = lm(PHQ_B3M_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(PHQ_B3M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0008791313
# 1 week
moderation_ERQ_GAD_1W <- lm(GAD_B1W_change ~ Group*A_PRE_ERQ_total, data = Full_data)
anova(moderation_ERQ_GAD_1W)
## Analysis of Variance Table
##
## Response: GAD_B1W_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 54.3 27.131 1.4588 0.2345
## A_PRE_ERQ_total 1 1.4 1.371 0.0737 0.7862
## Group:A_PRE_ERQ_total 2 70.0 35.021 1.8831 0.1543
## Residuals 245 4556.5 18.598
# 1 month
moderation_ERQ_GAD_1M <- lm(GAD_B1M_change ~ Group*A_PRE_ERQ_total, data = Full_data)
anova(moderation_ERQ_GAD_1M)
## Analysis of Variance Table
##
## Response: GAD_B1M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 294.1 147.030 5.8992 0.003192 **
## A_PRE_ERQ_total 1 53.9 53.931 2.1638 0.142714
## Group:A_PRE_ERQ_total 2 133.5 66.742 2.6779 0.070939 .
## Residuals 221 5508.1 24.924
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# 3 months
moderation_ERQ_GAD_3M <- lm(GAD_B3M_change ~ Group*A_PRE_ERQ_total, data = Full_data)
anova(moderation_ERQ_GAD_3M)
## Analysis of Variance Table
##
## Response: GAD_B3M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 149.0 74.480 2.3956 0.09357 .
## A_PRE_ERQ_total 1 3.6 3.582 0.1152 0.73461
## Group:A_PRE_ERQ_total 2 61.3 30.666 0.9864 0.37463
## Residuals 213 6622.2 31.090
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# 1 week
full_lm = lm(GAD_B1W_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(GAD_B1W_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0006685862
# 1 month
full_lm = lm(GAD_B1M_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(GAD_B1M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.001239923
# 3 months
full_lm = lm(GAD_B3M_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(GAD_B3M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0005152816
# Post
moderation_ERQ_mood_BP <- lm(negaff_BP_change ~ Group*A_PRE_ERQ_total, data = Full_data)
anova(moderation_ERQ_mood_BP)
## Analysis of Variance Table
##
## Response: negaff_BP_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 29097 14548.3 14.1469 1.504e-06 ***
## A_PRE_ERQ_total 1 1459 1458.8 1.4185 0.2348
## Group:A_PRE_ERQ_total 2 1276 638.1 0.6205 0.5385
## Residuals 252 259151 1028.4
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# 1 week
moderation_ERQ_mood_1W <- lm(negaff_B1W_change ~ Group*A_PRE_ERQ_total, data = Full_data)
anova(moderation_ERQ_mood_1W)
## Analysis of Variance Table
##
## Response: negaff_B1W_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 2952 1476.0 0.6614 0.5170
## A_PRE_ERQ_total 1 326 325.6 0.1459 0.7028
## Group:A_PRE_ERQ_total 2 10272 5135.8 2.3014 0.1023
## Residuals 244 544502 2231.6
# 1 month
moderation_ERQ_mood_1M <- lm(negaff_B1M_change ~ Group*A_PRE_ERQ_total, data = Full_data)
anova(moderation_ERQ_mood_1M)
## Analysis of Variance Table
##
## Response: negaff_B1M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 7881 3940.5 1.6676 0.1911
## A_PRE_ERQ_total 1 127 126.5 0.0535 0.8172
## Group:A_PRE_ERQ_total 2 3776 1888.0 0.7990 0.4511
## Residuals 222 524576 2363.0
# 3 months
moderation_ERQ_mood_3M <- lm(negaff_B3M_change ~ Group*A_PRE_ERQ_total, data = Full_data)
anova(moderation_ERQ_mood_3M)
## Analysis of Variance Table
##
## Response: negaff_B3M_change
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 16030 8014.8 3.2218 0.04183 *
## A_PRE_ERQ_total 1 46 45.8 0.0184 0.89221
## Group:A_PRE_ERQ_total 2 5332 2665.9 1.0717 0.34427
## Residuals 213 529869 2487.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# post
full_lm = lm(negaff_BP_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(negaff_BP_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.03132396
# 1 week
full_lm = lm(negaff_B1W_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(negaff_B1W_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0003010566
# 1 month
full_lm = lm(negaff_B1M_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(negaff_B1M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.0003112151
# 3 months
full_lm = lm(negaff_B3M_change ~ Group*A_PRE_RTQ_total, Full_data)
null_lm = lm(negaff_B3M_change ~ Group, Full_data)
BF_BIC = exp((BIC(null_lm) - BIC(full_lm))/2)
BF_BIC
## [1] 0.003452178
IUS_columns <- Full_data %>%
dplyr::select("A_PRE_IUS_total", "B_POST_IUS_total", "C_W1_IUS_total", "D_M1_IUS_total", "E_M3_IUS_total", "Group")
IUS_columns_long <- IUS_columns %>%
pivot_longer(cols = c(A_PRE_IUS_total, B_POST_IUS_total, C_W1_IUS_total, D_M1_IUS_total, E_M3_IUS_total),
names_to = "Time",
values_to = "IUS_Score")
tsummary_IUS <- IUS_columns_long %>%
group_by(Time) %>%
summarise(mean_value = mean(IUS_Score, na.rm = TRUE),
sd_value = sd(IUS_Score, na.rm = TRUE),
.groups = 'drop')
tround_IUS <- tsummary_IUS %>%
mutate(mean_value = round(mean_value, 2),
sd_value = round(sd_value, 2))
ius_anova <- aov(A_PRE_IUS_total ~ Group, data=IUS_columns)
summary(ius_anova)
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 143 71.27 0.907 0.405
## Residuals 256 20115 78.57
summary_IUS <- IUS_columns_long %>% # calculating means and sds
group_by(Group, Time) %>%
summarise(
mean_value = mean(IUS_Score, na.rm = TRUE),
sd_value = sd(IUS_Score, na.rm = TRUE),
.groups = 'drop')
round_IUS <- summary_IUS %>% # rounding to 2 decimal places
mutate(mean_value = round(mean_value, 2),
sd_value = round(sd_value, 2))
GAD_columns <- Full_data %>%
dplyr::select("A_PRE_GAD_total", "C_W1_GAD_total", "D_M1_GAD_total", "E_M3_GAD_total", "Group")
GAD_columns_long <- GAD_columns %>%
pivot_longer(cols = c(A_PRE_GAD_total, C_W1_GAD_total, D_M1_GAD_total, E_M3_GAD_total),
names_to = "Time",
values_to = "GAD_Score")
tsummary_GAD <- GAD_columns_long %>%
group_by(Time) %>%
summarise(mean_value = mean(GAD_Score, na.rm = TRUE),
sd_value = sd(GAD_Score, na.rm = TRUE),
.groups = 'drop')
tround_GAD <- tsummary_GAD %>%
mutate(mean_value = round(mean_value, 2),
sd_value = round(sd_value, 2))
gad_anova <- aov(A_PRE_GAD_total ~ Group, data=GAD_columns)
summary(gad_anova)
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 63 31.28 1.037 0.356
## Residuals 256 7720 30.16
summary_GAD <- GAD_columns_long %>% # calculating means and sds
group_by(Group, Time) %>%
summarise(
mean_value = mean(GAD_Score, na.rm = TRUE),
sd_value = sd(GAD_Score, na.rm = TRUE),
.groups = 'drop')
round_GAD <- summary_GAD %>% # rounding to 2 decimal places
mutate(mean_value = round(mean_value, 2),
sd_value = round(sd_value, 2))
PHQ_columns <- Full_data %>%
dplyr::select("A_PRE_PHQ_total", "C_W1_PHQ_total", "D_M1_PHQ_total", "E_M3_PHQ_total", "Group")
PHQ_columns_long <- PHQ_columns %>%
pivot_longer(cols = c(A_PRE_PHQ_total, C_W1_PHQ_total, D_M1_PHQ_total, E_M3_PHQ_total),
names_to = "Time",
values_to = "PHQ_Score")
tsummary_PHQ <- PHQ_columns_long %>%
group_by(Time) %>%
summarise(mean_value = mean(PHQ_Score, na.rm = TRUE),
sd_value = sd(PHQ_Score, na.rm = TRUE),
.groups = 'drop')
tround_PHQ <- tsummary_PHQ %>%
mutate(mean_value = round(mean_value, 2),
sd_value = round(sd_value, 2))
phq_anova <- aov(A_PRE_PHQ_total ~ Group, data=PHQ_columns)
summary(phq_anova)
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 80 40.09 1.162 0.315
## Residuals 256 8833 34.50
summary_PHQ <- PHQ_columns_long %>% # calculating means and sds
group_by(Group, Time) %>%
summarise(
mean_value = mean(PHQ_Score, na.rm = TRUE),
sd_value = sd(PHQ_Score, na.rm = TRUE),
.groups = 'drop')
round_PHQ <- summary_PHQ %>% # rounding to 2 decimal places
mutate(mean_value = round(mean_value, 2),
sd_value = round(sd_value, 2))
NA_columns <- Full_data %>%
dplyr::select("A_PRE_negaff", "B_POST_negaff", "C_W1_negaff", "D_M1_negaff", "E_M3_negaff", "Group")
NA_columns_long <- NA_columns %>%
pivot_longer(cols = c(A_PRE_negaff, B_POST_negaff, C_W1_negaff, D_M1_negaff, E_M3_negaff),
names_to = "Time",
values_to = "NA_Score")
tsummary_NA <- NA_columns_long %>%
group_by(Time) %>%
summarise(mean_value = mean(NA_Score, na.rm = TRUE),
sd_value = sd(NA_Score, na.rm = TRUE),
.groups = 'drop')
tround_NA <- tsummary_NA %>%
mutate(mean_value = round(mean_value, 2),
sd_value = round(sd_value, 2))
tround_NA
## # A tibble: 5 × 3
## Time mean_value sd_value
## <chr> <dbl> <dbl>
## 1 A_PRE_negaff -34.8 42.6
## 2 B_POST_negaff -54.6 36.4
## 3 C_W1_negaff -27.4 46.5
## 4 D_M1_negaff -25.5 48.4
## 5 E_M3_negaff -26.3 48.4
na_anova <- aov(A_PRE_negaff ~ Group, data=NA_columns)
summary(na_anova)
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 4935 2468 1.361 0.258
## Residuals 256 464156 1813
summary_NA <- NA_columns_long %>% # calculating means and sds
group_by(Group, Time) %>%
summarise(
mean_value = mean(NA_Score, na.rm = TRUE),
sd_value = sd(NA_Score, na.rm = TRUE),
.groups = 'drop')
round_NA <- summary_NA %>% # rounding to 2 decimal places
mutate(mean_value = round(mean_value, 2),
sd_value = round(sd_value, 2))
round_NA
## # A tibble: 15 × 4
## Group Time mean_value sd_value
## <chr> <chr> <dbl> <dbl>
## 1 A_ECs A_PRE_negaff -40.3 39.1
## 2 A_ECs B_POST_negaff -40.3 41.3
## 3 A_ECs C_W1_negaff -25.6 40.7
## 4 A_ECs D_M1_negaff -19.9 48.6
## 5 A_ECs E_M3_negaff -17.2 45.7
## 6 B_Controls A_PRE_negaff -37.3 44
## 7 B_Controls B_POST_negaff -57.3 34.8
## 8 B_Controls C_W1_negaff -30.8 48.9
## 9 B_Controls D_M1_negaff -30.3 49.4
## 10 B_Controls E_M3_negaff -30.1 50.1
## 11 C_Intervention A_PRE_negaff -29.6 42.7
## 12 C_Intervention B_POST_negaff -58.7 34.0
## 13 C_Intervention C_W1_negaff -24.6 46.7
## 14 C_Intervention D_M1_negaff -23.1 47.2
## 15 C_Intervention E_M3_negaff -26.2 47.6
GM_columns <- Full_data %>%
dplyr::select("A_PRE_GM", "B_POST_GM", "C_W1_GM", "D_M1_GM", "E_M3_GM", "Group")
GM_columns_long <- GM_columns %>%
pivot_longer(cols = c(A_PRE_GM, B_POST_GM, C_W1_GM, D_M1_GM, E_M3_GM),
names_to = "Time",
values_to = "GM_Score")
tsummary_GM <- GM_columns_long %>%
group_by(Time) %>%
summarise(mean_value = mean(GM_Score, na.rm = TRUE),
sd_value = sd(GM_Score, na.rm = TRUE),
.groups = 'drop')
tround_GM <- tsummary_GM %>%
mutate(mean_value = round(mean_value, 2),
sd_value = round(sd_value, 2))
gm_anova <- aov(A_PRE_GM ~ Group, data=GM_columns)
summary(gm_anova)
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 6.2 3.113 1.595 0.205
## Residuals 256 499.5 1.951
summary_GM <- GM_columns_long %>% # calculating means and sds
group_by(Group, Time) %>%
summarise(
mean_value = mean(GM_Score, na.rm = TRUE),
sd_value = sd(GM_Score, na.rm = TRUE),
.groups = 'drop')
round_GM <- summary_GM %>% # rounding to 2 decimal places
mutate(mean_value = round(mean_value, 2),
sd_value = round(sd_value, 2))
FI_columns <- Full_data %>%
dplyr::select("A_PRE_FI_total", "C_W1_FI_total", "D_M1_FI_total", "E_M3_FI_total", "Group")
FI_columns_long <- FI_columns %>%
pivot_longer(cols = c(A_PRE_FI_total, C_W1_FI_total, D_M1_FI_total, E_M3_FI_total),
names_to = "Time",
values_to = "FI_Score")
tsummary_FI <- FI_columns_long %>%
group_by(Time) %>%
summarise(mean_value = mean(FI_Score, na.rm = TRUE),
sd_value = sd(FI_Score, na.rm = TRUE),
.groups = 'drop')
tround_FI <- tsummary_FI %>%
mutate(mean_value = round(mean_value, 2),
sd_value = round(sd_value, 2))
fi_anova <- aov(A_PRE_FI_total ~ Group, data=FI_columns)
summary(fi_anova)
## Df Sum Sq Mean Sq F value Pr(>F)
## Group 2 17 8.279 0.531 0.588
## Residuals 256 3989 15.581
summary_FI <- FI_columns_long %>% # calculating means and sds
group_by(Group, Time) %>%
summarise(
mean_value = mean(FI_Score, na.rm = TRUE),
sd_value = sd(FI_Score, na.rm = TRUE),
.groups = 'drop')
round_FI <- summary_FI %>% # rounding to 2 decimal places
mutate(mean_value = round(mean_value, 2),
sd_value = round(sd_value, 2))
# Baseline
PRE_IUS_responses <- Full_data %>%
dplyr::select(PRE_IUS_1, PRE_IUS_2, PRE_IUS_3, PRE_IUS_4, PRE_IUS_5, PRE_IUS_6, PRE_IUS_7, PRE_IUS_8, PRE_IUS_9, PRE_IUS_10, PRE_IUS_11, PRE_IUS_12)
PRE_FI_responses <- Full_data %>%
dplyr::select(PRE_FI_1, PRE_FI_2, PRE_FI_3, PRE_FI_4, PRE_FI_5)
PRE_PHQ_responses <- Full_data %>%
dplyr::select(PRE_PHQ_1, PRE_PHQ_2, PRE_PHQ_3, PRE_PHQ_4, PRE_PHQ_5, PRE_PHQ_6, PRE_PHQ_7, PRE_PHQ_8)
PRE_GAD_responses <- Full_data %>%
dplyr::select(PRE_GAD_1, PRE_GAD_2, PRE_GAD_3, PRE_GAD_4, PRE_GAD_5, PRE_GAD_6, PRE_GAD_7)
PRE_RTQ_responses <- Full_data %>%
dplyr::select(PRE_RTQ_1, PRE_RTQ_2, PRE_RTQ_3, PRE_RTQ_4, PRE_RTQ_5, PRE_RTQ_6, PRE_RTQ_7, PRE_RTQ_8, PRE_RTQ_9, PRE_RTQ_10)
PRE_ERQ_responses <- Full_data %>%
dplyr::select(PRE_ERQ_1, PRE_ERQ_2, PRE_ERQ_3, PRE_ERQ_4, PRE_ERQ_5, PRE_ERQ_6, PRE_ERQ_7, PRE_ERQ_8, PRE_ERQ_9, PRE_ERQ_10)
# Post
POST_IUS_responses <- Full_data %>%
dplyr::select(POST_IUS_1, POST_IUS_2, POST_IUS_3, POST_IUS_4, POST_IUS_5, POST_IUS_6, POST_IUS_7, POST_IUS_8, POST_IUS_9, POST_IUS_10, POST_IUS_11, POST_IUS_12)
Acceptability_responses <- Acceptability %>%
dplyr::select(B_acceptability_understandable, B_acceptability_useful, B_acceptability_recommend)
# 1 Week
W1_IUS_responses <- Full_data %>%
dplyr::select(W1_IUS_1, W1_IUS_2, W1_IUS_3, W1_IUS_4, W1_IUS_5, W1_IUS_6, W1_IUS_7, W1_IUS_8, W1_IUS_9, W1_IUS_10, W1_IUS_11, W1_IUS_12)
W1_FI_responses <- Full_data %>%
dplyr::select(W1_FI_1, W1_FI_2, W1_FI_3, W1_FI_4, W1_FI_5)
W1_PHQ_responses <- Full_data %>%
dplyr::select(W1_PHQ_1, W1_PHQ_2, W1_PHQ_3, W1_PHQ_4, W1_PHQ_5, W1_PHQ_6, W1_PHQ_7, W1_PHQ_8)
W1_GAD_responses <- Full_data %>%
dplyr::select(W1_GAD_1, W1_GAD_2, W1_GAD_3, W1_GAD_4, W1_GAD_5, W1_GAD_6, W1_GAD_7)
# 1 Month
M1_IUS_responses <- Full_data %>%
dplyr::select(M1_IUS_1, M1_IUS_2, M1_IUS_3, M1_IUS_4, M1_IUS_5, M1_IUS_6, M1_IUS_7, M1_IUS_8, M1_IUS_9, M1_IUS_10, M1_IUS_11, M1_IUS_12)
M1_FI_responses <- Full_data %>%
dplyr::select(M1_FI_1, M1_FI_2, M1_FI_3, M1_FI_4, M1_FI_5)
M1_PHQ_responses <- Full_data %>%
dplyr::select(M1_PHQ_1, M1_PHQ_2, M1_PHQ_3, M1_PHQ_4, M1_PHQ_5, M1_PHQ_6, M1_PHQ_7, M1_PHQ_8)
M1_GAD_responses <- Full_data %>%
dplyr::select(M1_GAD_1, M1_GAD_2, M1_GAD_3, M1_GAD_4, M1_GAD_5, M1_GAD_6, M1_GAD_7)
# 3 Months
M3_IUS_responses <- Full_data %>%
dplyr::select(M3_IUS_1, M3_IUS_2, M3_IUS_3, M3_IUS_4, M3_IUS_5, M3_IUS_6, M3_IUS_7, M3_IUS_8, M3_IUS_9, M3_IUS_10, M3_IUS_11, M3_IUS_12)
M3_FI_responses <- Full_data %>%
dplyr::select(M3_FI_1, M3_FI_2, M3_FI_3, M3_FI_4, M3_FI_5)
M3_PHQ_responses <- Full_data %>%
dplyr::select(M3_PHQ_1, M3_PHQ_2, M3_PHQ_3, M3_PHQ_4, M3_PHQ_5, M3_PHQ_6, M3_PHQ_7, M3_PHQ_8)
M3_GAD_responses <- Full_data %>%
dplyr::select(M3_GAD_1, M3_GAD_2, M3_GAD_3, M3_GAD_4, M3_GAD_5, M3_GAD_6, M3_GAD_7)
omega(PRE_IUS_responses) # omega total = 0.89
## Loading required namespace: GPArotation
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.87
## G.6: 0.87
## Omega Hierarchical: 0.7
## Omega H asymptotic: 0.78
## Omega Total 0.89
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## PRE_IUS_1 0.65 0.55 0.73 0.73 0.27 0.58 1.95
## PRE_IUS_2 0.53 0.34 0.40 0.40 0.60 0.69 1.77
## PRE_IUS_3 0.53 0.27 0.36 0.36 0.64 0.78 1.53
## PRE_IUS_4 0.37 0.41 0.31 0.31 0.69 0.46 2.01
## PRE_IUS_5 0.51 0.34 0.34 0.66 0.78 1.59
## PRE_IUS_6 0.63 0.39 0.56 0.56 0.44 0.71 1.74
## PRE_IUS_7 0.70 0.43 0.68 0.68 0.32 0.73 1.67
## PRE_IUS_8 0.41 0.47 0.40 0.40 0.60 0.42 2.11
## PRE_IUS_9 0.56 0.31 0.44 0.44 0.56 0.72 1.75
## PRE_IUS_10 0.60 0.28 0.45 0.45 0.55 0.80 1.49
## PRE_IUS_11 0.40 0.53 0.44 0.44 0.56 0.35 1.86
## PRE_IUS_12 0.53 0.45 0.51 0.51 0.49 0.55 2.15
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 3.56 0.54 1.02 0.49 2.81
##
## general/max 1.27 max/min = 5.76
## mean percent general = 0.63 with sd = 0.15 and cv of 0.24
## Explained Common Variance of the general factor = 0.63
##
## The degrees of freedom are 33 and the fit is 0.15
## The number of observations was 259 with Chi Square = 37.19 with prob < 0.28
## The root mean square of the residuals is 0.03
## The df corrected root mean square of the residuals is 0.04
## RMSEA index = 0.022 and the 10 % confidence intervals are 0 0.052
## BIC = -146.18
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 54 and the fit is 0.73
## The number of observations was 259 with Chi Square = 183.64 with prob < 5e-16
## The root mean square of the residuals is 0.1
## The df corrected root mean square of the residuals is 0.11
##
## RMSEA index = 0.096 and the 10 % confidence intervals are 0.081 0.112
## BIC = -116.43
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.86 0.57 0.74 0.67
## Multiple R square of scores with factors 0.74 0.32 0.54 0.44
## Minimum correlation of factor score estimates 0.48 -0.36 0.09 -0.11
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.89 0.80 0.78 0.71
## Omega general for total scores and subscales 0.70 0.61 0.45 0.45
## Omega group for total scores and subscales 0.14 0.19 0.33 0.26
omega(POST_IUS_responses) # omega total = 0.94
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.92
## G.6: 0.93
## Omega Hierarchical: 0.78
## Omega H asymptotic: 0.83
## Omega Total 0.94
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## POST_IUS_1 0.81 0.43 0.84 0.84 0.16 0.77 1.55
## POST_IUS_2 0.67 0.28 0.56 0.56 0.44 0.81 1.49
## POST_IUS_3 0.68 0.32 0.56 0.56 0.44 0.82 1.43
## POST_IUS_4 0.53 0.46 0.51 0.51 0.49 0.56 2.08
## POST_IUS_5 0.64 0.21 0.21 0.50 0.50 0.50 0.81 1.47
## POST_IUS_6 0.71 0.39 0.67 0.67 0.33 0.76 1.60
## POST_IUS_7 0.77 0.40 0.76 0.76 0.24 0.79 1.51
## POST_IUS_8 0.51 0.44 0.49 0.49 0.51 0.54 2.23
## POST_IUS_9 0.70 0.20 0.27 0.61 0.61 0.39 0.80 1.51
## POST_IUS_10 0.71 0.36 0.63 0.63 0.37 0.79 1.50
## POST_IUS_11 0.45 0.62 0.59 0.59 0.41 0.34 1.83
## POST_IUS_12 0.58 0.23 0.36 0.52 0.52 0.48 0.65 2.05
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 5.15 0.69 1.08 0.33 4.51
##
## general/max 1.14 max/min = 13.64
## mean percent general = 0.7 with sd = 0.15 and cv of 0.21
## Explained Common Variance of the general factor = 0.71
##
## The degrees of freedom are 33 and the fit is 0.09
## The number of observations was 259 with Chi Square = 22.01 with prob < 0.93
## The root mean square of the residuals is 0.02
## The df corrected root mean square of the residuals is 0.02
## RMSEA index = 0 and the 10 % confidence intervals are 0 0.015
## BIC = -161.36
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 54 and the fit is 0.96
## The number of observations was 259 with Chi Square = 242.4 with prob < 1.1e-25
## The root mean square of the residuals is 0.11
## The df corrected root mean square of the residuals is 0.12
##
## RMSEA index = 0.116 and the 10 % confidence intervals are 0.102 0.131
## BIC = -57.67
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.91 0.60 0.80 0.62
## Multiple R square of scores with factors 0.82 0.35 0.63 0.39
## Minimum correlation of factor score estimates 0.64 -0.29 0.27 -0.22
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.94 0.89 0.83 0.81
## Omega general for total scores and subscales 0.78 0.72 0.52 0.66
## Omega group for total scores and subscales 0.10 0.17 0.31 0.15
omega(W1_IUS_responses) # omega total = 0.93
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.91
## G.6: 0.91
## Omega Hierarchical: 0.71
## Omega H asymptotic: 0.77
## Omega Total 0.93
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## W1_IUS_1 0.68 0.33 0.62 0.62 0.38 0.76 1.65
## W1_IUS_2 0.71 0.71 1.00 1.00 0.00 0.50 2.00
## W1_IUS_3 0.56 0.38 0.46 0.46 0.54 0.67 1.81
## W1_IUS_4 0.54 0.43 0.48 0.48 0.52 0.62 1.91
## W1_IUS_5 0.49 0.36 0.38 0.38 0.62 0.63 1.97
## W1_IUS_6 0.60 0.58 0.70 0.70 0.30 0.52 2.02
## W1_IUS_7 0.61 0.51 0.64 0.64 0.36 0.58 1.97
## W1_IUS_8 0.57 0.43 0.51 0.51 0.49 0.63 1.90
## W1_IUS_9 0.58 0.29 0.26 0.50 0.50 0.50 0.68 1.95
## W1_IUS_10 0.60 0.52 0.63 0.63 0.37 0.57 1.96
## W1_IUS_11 0.59 0.47 0.57 0.57 0.43 0.61 1.92
## W1_IUS_12 0.57 0.32 0.47 0.47 0.53 0.70 1.83
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 4.25 1.37 0.81 0.53 4.32
##
## general/max 0.98 max/min = 8.11
## mean percent general = 0.62 with sd = 0.07 and cv of 0.12
## Explained Common Variance of the general factor = 0.61
##
## The degrees of freedom are 33 and the fit is 0.21
## The number of observations was 259 with Chi Square = 53.03 with prob < 0.015
## The root mean square of the residuals is 0.03
## The df corrected root mean square of the residuals is 0.04
## RMSEA index = 0.048 and the 10 % confidence intervals are 0.022 0.072
## BIC = -130.35
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 54 and the fit is 1.25
## The number of observations was 259 with Chi Square = 314.4 with prob < 2e-38
## The root mean square of the residuals is 0.13
## The df corrected root mean square of the residuals is 0.14
##
## RMSEA index = 0.136 and the 10 % confidence intervals are 0.122 0.152
## BIC = 14.34
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.86 0.75 0.68 0.87
## Multiple R square of scores with factors 0.75 0.56 0.47 0.76
## Minimum correlation of factor score estimates 0.49 0.12 -0.07 0.52
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.93 0.88 0.79 1.0
## Omega general for total scores and subscales 0.71 0.58 0.52 0.5
## Omega group for total scores and subscales 0.17 0.30 0.27 0.5
omega(M1_IUS_responses) # omega total = 0.93
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.9
## G.6: 0.91
## Omega Hierarchical: 0.68
## Omega H asymptotic: 0.73
## Omega Total 0.93
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## M1_IUS_1 0.64 0.28 0.22 0.55 0.55 0.45 0.75 1.68
## M1_IUS_2 0.71 0.62 0.89 0.89 0.11 0.57 1.96
## M1_IUS_3 0.56 0.48 0.54 0.54 0.46 0.58 1.96
## M1_IUS_4 0.49 0.53 0.52 0.52 0.48 0.46 2.05
## M1_IUS_5 0.51 0.28 0.37 0.37 0.63 0.72 1.79
## M1_IUS_6 0.57 0.60 0.68 0.68 0.32 0.47 2.01
## M1_IUS_7 0.64 0.62 0.79 0.79 0.21 0.51 2.00
## M1_IUS_8 0.47 0.34 0.35 0.35 0.65 0.64 1.91
## M1_IUS_9 0.64 0.31 0.25 0.57 0.57 0.43 0.71 1.82
## M1_IUS_10 0.53 0.52 0.56 0.56 0.44 0.51 2.00
## M1_IUS_11 0.53 0.52 0.57 0.57 0.43 0.49 2.10
## M1_IUS_12 0.58 0.21 0.30 0.48 0.48 0.52 0.72 1.79
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 3.99 1.55 0.86 0.46 4.19
##
## general/max 0.95 max/min = 9.13
## mean percent general = 0.59 with sd = 0.11 and cv of 0.18
## Explained Common Variance of the general factor = 0.58
##
## The degrees of freedom are 33 and the fit is 0.16
## The number of observations was 259 with Chi Square = 39.7 with prob < 0.2
## The root mean square of the residuals is 0.02
## The df corrected root mean square of the residuals is 0.03
## RMSEA index = 0.028 and the 10 % confidence intervals are 0 0.056
## BIC = -143.67
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 54 and the fit is 1.4
## The number of observations was 259 with Chi Square = 353.68 with prob < 1.3e-45
## The root mean square of the residuals is 0.14
## The df corrected root mean square of the residuals is 0.16
##
## RMSEA index = 0.146 and the 10 % confidence intervals are 0.132 0.161
## BIC = 53.61
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.85 0.78 0.72 0.74
## Multiple R square of scores with factors 0.72 0.61 0.51 0.55
## Minimum correlation of factor score estimates 0.45 0.22 0.03 0.10
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.93 0.89 0.77 0.89
## Omega general for total scores and subscales 0.68 0.57 0.46 0.50
## Omega group for total scores and subscales 0.18 0.32 0.31 0.38
omega(M3_IUS_responses) # omega total = 0.91
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.89
## G.6: 0.9
## Omega Hierarchical: 0.7
## Omega H asymptotic: 0.76
## Omega Total 0.91
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## M3_IUS_1 0.69 0.43 0.67 0.67 0.33 0.72 1.67
## M3_IUS_2 0.63 0.21 0.49 0.49 0.51 0.81 1.50
## M3_IUS_3 0.57 0.47 0.55 0.55 0.45 0.59 1.96
## M3_IUS_4 0.42 0.45 0.39 0.39 0.61 0.45 2.12
## M3_IUS_5 0.49 0.21 0.31 0.31 0.69 0.77 1.61
## M3_IUS_6 0.58 0.59 0.69 0.69 0.31 0.48 2.03
## M3_IUS_7 0.59 0.56 0.68 0.68 0.32 0.52 2.05
## M3_IUS_8 0.50 0.42 0.42 0.42 0.58 0.58 1.98
## M3_IUS_9 0.65 0.21 0.53 0.53 0.47 0.80 1.54
## M3_IUS_10 0.60 0.37 0.51 0.51 0.49 0.70 1.76
## M3_IUS_11 0.44 0.56 0.52 0.52 0.48 0.38 1.91
## M3_IUS_12 0.56 0.43 0.51 0.51 0.49 0.61 1.97
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 3.84 1.14 1.01 0.28 3.42
##
## general/max 1.12 max/min = 12.29
## mean percent general = 0.62 with sd = 0.14 and cv of 0.23
## Explained Common Variance of the general factor = 0.61
##
## The degrees of freedom are 33 and the fit is 0.19
## The number of observations was 259 with Chi Square = 48.25 with prob < 0.042
## The root mean square of the residuals is 0.03
## The df corrected root mean square of the residuals is 0.04
## RMSEA index = 0.042 and the 10 % confidence intervals are 0.008 0.067
## BIC = -135.12
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 54 and the fit is 1.11
## The number of observations was 259 with Chi Square = 279.12 with prob < 4.3e-32
## The root mean square of the residuals is 0.12
## The df corrected root mean square of the residuals is 0.14
##
## RMSEA index = 0.127 and the 10 % confidence intervals are 0.113 0.142
## BIC = -20.95
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.85 0.74 0.72 0.52
## Multiple R square of scores with factors 0.73 0.55 0.52 0.27
## Minimum correlation of factor score estimates 0.46 0.11 0.05 -0.45
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.91 0.86 0.80 0.67
## Omega general for total scores and subscales 0.70 0.55 0.51 0.48
## Omega group for total scores and subscales 0.16 0.31 0.29 0.19
omega(PRE_FI_responses) # omega total = 0.78
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs = np.obs, :
## The estimated weights for the factor scores are probably incorrect. Try a
## different factor score estimation method.
## Warning in fac(r = r, nfactors = nfactors, n.obs = n.obs, rotate = rotate, : An
## ultra-Heywood case was detected. Examine the results carefully
## Warning in cov2cor(t(w) %*% r %*% w): diag(V) had non-positive or NA entries;
## the non-finite result may be dubious
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.68
## G.6: 0.66
## Omega Hierarchical: 0.56
## Omega H asymptotic: 0.74
## Omega Total 0.75
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## PRE_FI_1 0.70 0.50 0.50 0.50 0.99 1.03
## PRE_FI_2 0.30 0.32 0.21 0.21 0.79 0.44 2.34
## PRE_FI_3 0.43 0.53 0.47 0.47 0.53 0.40 1.93
## PRE_FI_4 0.45 0.70 0.69 0.69 0.31 0.29 1.70
## PRE_FI_5 0.59 0.38 0.38 0.62 0.93 1.20
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 1.33 0.80 0.00 0.13 1.13
##
## general/max 1.17 max/min = Inf
## mean percent general = 0.61 with sd = 0.32 and cv of 0.53
## Explained Common Variance of the general factor = 0.59
##
## The degrees of freedom are -2 and the fit is 0
## The number of observations was 259 with Chi Square = 0 with prob < NA
## The root mean square of the residuals is 0
## The df corrected root mean square of the residuals is NA
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 5 and the fit is 0.23
## The number of observations was 259 with Chi Square = 59.63 with prob < 1.4e-11
## The root mean square of the residuals is 0.13
## The df corrected root mean square of the residuals is 0.18
##
## RMSEA index = 0.205 and the 10 % confidence intervals are 0.161 0.254
## BIC = 31.85
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.81 0.78 0 0.39
## Multiple R square of scores with factors 0.65 0.61 0 0.15
## Minimum correlation of factor score estimates 0.31 0.21 -1 -0.70
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.75 0.73 NA 0.57
## Omega general for total scores and subscales 0.56 0.25 NA 0.56
## Omega group for total scores and subscales 0.14 0.48 NA 0.01
omega(W1_FI_responses) # omega total = 0.82
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs = np.obs, :
## The estimated weights for the factor scores are probably incorrect. Try a
## different factor score estimation method.
## Warning in fac(r = r, nfactors = nfactors, n.obs = n.obs, rotate = rotate, : An
## ultra-Heywood case was detected. Examine the results carefully
## Warning in cov2cor(t(w) %*% r %*% w): diag(V) had non-positive or NA entries;
## the non-finite result may be dubious
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.72
## G.6: 0.7
## Omega Hierarchical: 0.62
## Omega H asymptotic: 0.77
## Omega Total 0.8
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## W1_FI_1 0.85 0.73 0.73 0.27 1.00 1.01
## W1_FI_2 0.33 0.49 0.36 0.36 0.64 0.31 1.84
## W1_FI_3 0.36 0.68 0.59 0.59 0.41 0.22 1.53
## W1_FI_4 0.53 0.48 0.55 0.55 0.45 0.52 2.12
## W1_FI_5 0.62 0.20 0.44 0.44 0.56 0.89 1.25
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 1.64 0.75 0.00 0.28 1.51
##
## general/max 1.09 max/min = Inf
## mean percent general = 0.59 with sd = 0.35 and cv of 0.59
## Explained Common Variance of the general factor = 0.62
##
## The degrees of freedom are -2 and the fit is 0
## The number of observations was 259 with Chi Square = 0 with prob < NA
## The root mean square of the residuals is 0
## The df corrected root mean square of the residuals is NA
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 5 and the fit is 0.23
## The number of observations was 259 with Chi Square = 58.67 with prob < 2.3e-11
## The root mean square of the residuals is 0.12
## The df corrected root mean square of the residuals is 0.17
##
## RMSEA index = 0.204 and the 10 % confidence intervals are 0.159 0.252
## BIC = 30.89
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.89 0.77 0 0.56
## Multiple R square of scores with factors 0.79 0.59 0 0.31
## Minimum correlation of factor score estimates 0.59 0.18 -1 -0.38
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.80 0.73 NA 0.64
## Omega general for total scores and subscales 0.62 0.41 NA 0.53
## Omega group for total scores and subscales 0.18 0.33 NA 0.12
omega(M1_FI_responses) # omega total = 0.82
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs = np.obs, :
## The estimated weights for the factor scores are probably incorrect. Try a
## different factor score estimation method.
## Warning in fac(r = r, nfactors = nfactors, n.obs = n.obs, rotate = rotate, : An
## ultra-Heywood case was detected. Examine the results carefully
## Warning in cov2cor(t(w) %*% r %*% w): diag(V) had non-positive or NA entries;
## the non-finite result may be dubious
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.75
## G.6: 0.73
## Omega Hierarchical: 0.62
## Omega H asymptotic: 0.77
## Omega Total 0.8
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## M1_FI_1 0.51 0.60 0.63 0.63 0.37 0.42 1.95
## M1_FI_2 0.28 0.48 0.33 0.33 0.67 0.25 1.79
## M1_FI_3 0.71 0.51 0.51 0.49 0.98 1.09
## M1_FI_4 0.79 0.63 0.63 0.37 0.98 1.04
## M1_FI_5 0.50 0.38 0.25 0.44 0.44 0.56 0.55 2.39
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 1.71 0.00 0.74 0.11 1.36
##
## general/max 1.26 max/min = Inf
## mean percent general = 0.64 with sd = 0.33 and cv of 0.52
## Explained Common Variance of the general factor = 0.67
##
## The degrees of freedom are -2 and the fit is 0
## The number of observations was 259 with Chi Square = 0 with prob < NA
## The root mean square of the residuals is 0
## The df corrected root mean square of the residuals is NA
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 5 and the fit is 0.2
## The number of observations was 259 with Chi Square = 51.76 with prob < 6e-10
## The root mean square of the residuals is 0.13
## The df corrected root mean square of the residuals is 0.18
##
## RMSEA index = 0.19 and the 10 % confidence intervals are 0.145 0.239
## BIC = 23.98
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.87 0 0.74 0.41
## Multiple R square of scores with factors 0.76 0 0.55 0.17
## Minimum correlation of factor score estimates 0.52 -1 0.10 -0.67
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.80 NA 0.70 0.73
## Omega general for total scores and subscales 0.62 NA 0.31 0.73
## Omega group for total scores and subscales 0.17 NA 0.39 0.00
omega(M3_FI_responses) # omega total = 0.80
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs = np.obs, :
## The estimated weights for the factor scores are probably incorrect. Try a
## different factor score estimation method.
## Warning in fac(r = r, nfactors = nfactors, n.obs = n.obs, rotate = rotate, : An
## ultra-Heywood case was detected. Examine the results carefully
## Warning in cov2cor(t(w) %*% r %*% w): diag(V) had non-positive or NA entries;
## the non-finite result may be dubious
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.75
## G.6: 0.72
## Omega Hierarchical: 0.68
## Omega H asymptotic: 0.85
## Omega Total 0.8
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## M3_FI_1 0.75 0.56 0.56 0.44 1.00 1.01
## M3_FI_2 0.46 0.37 0.36 0.36 0.64 0.58 2.01
## M3_FI_3 0.50 0.48 0.49 0.49 0.51 0.51 2.17
## M3_FI_4 0.56 0.49 0.57 0.57 0.43 0.54 2.06
## M3_FI_5 0.66 0.48 0.48 0.52 0.91 1.20
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 1.8 0.5 0.0 0.2 1.2
##
## general/max 1.43 max/min = Inf
## mean percent general = 0.71 with sd = 0.23 and cv of 0.32
## Explained Common Variance of the general factor = 0.72
##
## The degrees of freedom are -2 and the fit is 0
## The number of observations was 259 with Chi Square = 0 with prob < NA
## The root mean square of the residuals is 0
## The df corrected root mean square of the residuals is NA
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 5 and the fit is 0.11
## The number of observations was 259 with Chi Square = 27.87 with prob < 3.9e-05
## The root mean square of the residuals is 0.08
## The df corrected root mean square of the residuals is 0.12
##
## RMSEA index = 0.133 and the 10 % confidence intervals are 0.088 0.183
## BIC = 0.09
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.86 0.64 0 0.49
## Multiple R square of scores with factors 0.73 0.41 0 0.24
## Minimum correlation of factor score estimates 0.47 -0.19 -1 -0.51
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.80 0.74 NA 0.60
## Omega general for total scores and subscales 0.68 0.52 NA 0.53
## Omega group for total scores and subscales 0.11 0.22 NA 0.07
omega(PRE_PHQ_responses) # omega total = 0.88
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.84
## G.6: 0.84
## Omega Hierarchical: 0.73
## Omega H asymptotic: 0.83
## Omega Total 0.88
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## PRE_PHQ_1 0.61 0.41 0.41 0.59 0.92 1.18
## PRE_PHQ_2 0.79 0.24 0.69 0.69 0.31 0.90 1.22
## PRE_PHQ_3 0.59 0.69 0.83 0.83 0.17 0.42 1.95
## PRE_PHQ_4 0.54 0.24 0.25 0.41 0.41 0.59 0.70 1.86
## PRE_PHQ_5 0.44 0.26 0.20 0.30 0.30 0.70 0.64 2.08
## PRE_PHQ_6 0.72 0.21 0.58 0.58 0.42 0.89 1.24
## PRE_PHQ_7 0.50 0.64 0.65 0.65 0.35 0.38 1.89
## PRE_PHQ_8 0.50 0.30 0.34 0.34 0.66 0.72 1.70
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 2.85 0.13 0.62 0.63 2.48
##
## general/max 1.15 max/min = 18.81
## mean percent general = 0.7 with sd = 0.21 and cv of 0.3
## Explained Common Variance of the general factor = 0.67
##
## The degrees of freedom are 7 and the fit is 0.07
## The number of observations was 259 with Chi Square = 17.89 with prob < 0.012
## The root mean square of the residuals is 0.02
## The df corrected root mean square of the residuals is 0.05
## RMSEA index = 0.077 and the 10 % confidence intervals are 0.034 0.123
## BIC = -21
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 20 and the fit is 0.34
## The number of observations was 259 with Chi Square = 85.09 with prob < 5.3e-10
## The root mean square of the residuals is 0.09
## The df corrected root mean square of the residuals is 0.1
##
## RMSEA index = 0.112 and the 10 % confidence intervals are 0.088 0.137
## BIC = -26.05
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.89 0.31 0.81 0.74
## Multiple R square of scores with factors 0.79 0.10 0.66 0.55
## Minimum correlation of factor score estimates 0.59 -0.80 0.32 0.09
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.88 0.79 0.68 0.70
## Omega general for total scores and subscales 0.73 0.73 0.37 0.44
## Omega group for total scores and subscales 0.09 0.06 0.31 0.26
omega(W1_PHQ_responses) # omega total = 0.89
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.86
## G.6: 0.86
## Omega Hierarchical: 0.74
## Omega H asymptotic: 0.83
## Omega Total 0.89
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## W1_PHQ_1 0.63 0.34 0.52 0.52 0.48 0.77 1.57
## W1_PHQ_2 0.74 0.44 0.75 0.75 0.25 0.74 1.64
## W1_PHQ_3 0.65 0.50 0.67 0.67 0.33 0.63 1.87
## W1_PHQ_4 0.64 0.37 0.55 0.55 0.45 0.73 1.69
## W1_PHQ_5 0.54 0.21 0.36 0.36 0.64 0.82 1.44
## W1_PHQ_6 0.63 0.35 0.54 0.54 0.46 0.75 1.62
## W1_PHQ_7 0.57 0.75 0.88 0.88 0.12 0.36 1.86
## W1_PHQ_8 0.45 0.35 0.33 0.33 0.67 0.60 2.02
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 3.00 0.46 0.43 0.72 2.89
##
## general/max 1.04 max/min = 6.75
## mean percent general = 0.68 with sd = 0.15 and cv of 0.22
## Explained Common Variance of the general factor = 0.65
##
## The degrees of freedom are 7 and the fit is 0.03
## The number of observations was 259 with Chi Square = 6.51 with prob < 0.48
## The root mean square of the residuals is 0.02
## The df corrected root mean square of the residuals is 0.03
## RMSEA index = 0 and the 10 % confidence intervals are 0 0.073
## BIC = -32.39
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 20 and the fit is 0.42
## The number of observations was 259 with Chi Square = 106.89 with prob < 7.2e-14
## The root mean square of the residuals is 0.09
## The df corrected root mean square of the residuals is 0.11
##
## RMSEA index = 0.129 and the 10 % confidence intervals are 0.106 0.154
## BIC = -4.24
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.87 0.58 0.62 0.86
## Multiple R square of scores with factors 0.76 0.33 0.39 0.74
## Minimum correlation of factor score estimates 0.53 -0.34 -0.22 0.48
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.89 0.81 0.76 0.74
## Omega general for total scores and subscales 0.74 0.62 0.56 0.34
## Omega group for total scores and subscales 0.11 0.19 0.19 0.40
omega(M1_PHQ_responses) # omega total = 0.90
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.88
## G.6: 0.87
## Omega Hierarchical: 0.75
## Omega H asymptotic: 0.83
## Omega Total 0.9
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## M1_PHQ_1 0.70 0.37 0.63 0.63 0.37 0.77 1.55
## M1_PHQ_2 0.72 0.48 0.75 0.75 0.25 0.68 1.77
## M1_PHQ_3 0.59 0.21 0.42 0.42 0.58 0.82 1.44
## M1_PHQ_4 0.80 0.59 1.00 1.00 0.00 0.65 1.83
## M1_PHQ_5 0.56 0.29 0.43 0.43 0.57 0.73 1.73
## M1_PHQ_6 0.64 0.30 0.53 0.53 0.47 0.78 1.57
## M1_PHQ_7 0.58 0.24 0.27 0.47 0.47 0.53 0.73 1.77
## M1_PHQ_8 0.46 0.55 0.52 0.52 0.48 0.41 1.94
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 3.27 0.57 0.40 0.50 3.08
##
## general/max 1.06 max/min = 7.61
## mean percent general = 0.7 with sd = 0.13 and cv of 0.18
## Explained Common Variance of the general factor = 0.69
##
## The degrees of freedom are 7 and the fit is 0.05
## The number of observations was 259 with Chi Square = 11.48 with prob < 0.12
## The root mean square of the residuals is 0.02
## The df corrected root mean square of the residuals is 0.04
## RMSEA index = 0.05 and the 10 % confidence intervals are 0 0.1
## BIC = -27.42
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 20 and the fit is 0.36
## The number of observations was 259 with Chi Square = 91.65 with prob < 3.8e-11
## The root mean square of the residuals is 0.09
## The df corrected root mean square of the residuals is 0.11
##
## RMSEA index = 0.118 and the 10 % confidence intervals are 0.094 0.143
## BIC = -19.48
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.89 0.64 0.78 0.67
## Multiple R square of scores with factors 0.79 0.40 0.62 0.45
## Minimum correlation of factor score estimates 0.59 -0.19 0.23 -0.09
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.90 0.84 1.00 0.70
## Omega general for total scores and subscales 0.75 0.66 0.65 0.47
## Omega group for total scores and subscales 0.10 0.18 0.35 0.23
omega(M3_PHQ_responses) # omega total = 0.89
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.86
## G.6: 0.85
## Omega Hierarchical: 0.72
## Omega H asymptotic: 0.82
## Omega Total 0.89
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## M3_PHQ_1 0.60 0.21 0.44 0.44 0.56 0.83 1.44
## M3_PHQ_2 0.82 0.47 0.90 0.90 0.10 0.75 1.61
## M3_PHQ_3 0.53 0.53 0.56 0.56 0.44 0.50 2.00
## M3_PHQ_4 0.58 0.40 0.52 0.52 0.48 0.66 1.86
## M3_PHQ_5 0.51 0.31 0.37 0.37 0.63 0.70 1.81
## M3_PHQ_6 0.65 0.29 0.23 0.57 0.57 0.43 0.74 1.74
## M3_PHQ_7 0.63 0.38 0.56 0.56 0.44 0.72 1.71
## M3_PHQ_8 0.47 0.44 0.41 0.41 0.59 0.53 2.03
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 2.96 0.36 0.50 0.51 2.54
##
## general/max 1.17 max/min = 6.99
## mean percent general = 0.68 with sd = 0.11 and cv of 0.17
## Explained Common Variance of the general factor = 0.68
##
## The degrees of freedom are 7 and the fit is 0.05
## The number of observations was 259 with Chi Square = 12.16 with prob < 0.095
## The root mean square of the residuals is 0.02
## The df corrected root mean square of the residuals is 0.04
## RMSEA index = 0.053 and the 10 % confidence intervals are 0 0.102
## BIC = -26.74
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 20 and the fit is 0.36
## The number of observations was 259 with Chi Square = 91.28 with prob < 4.4e-11
## The root mean square of the residuals is 0.09
## The df corrected root mean square of the residuals is 0.11
##
## RMSEA index = 0.117 and the 10 % confidence intervals are 0.094 0.143
## BIC = -19.86
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.88 0.59 0.63 0.66
## Multiple R square of scores with factors 0.77 0.35 0.40 0.43
## Minimum correlation of factor score estimates 0.55 -0.30 -0.20 -0.13
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.89 0.82 0.69 0.69
## Omega general for total scores and subscales 0.72 0.67 0.47 0.41
## Omega group for total scores and subscales 0.10 0.15 0.23 0.29
omega(PRE_GAD_responses) # omega total = 0.9
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.88
## G.6: 0.87
## Omega Hierarchical: 0.81
## Omega H asymptotic: 0.89
## Omega Total 0.91
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## PRE_GAD_1 0.65 0.24 0.48 0.48 0.52 0.88 1.26
## PRE_GAD_2 0.80 0.29 0.72 0.72 0.28 0.88 1.26
## PRE_GAD_3 0.78 0.29 0.69 0.69 0.31 0.88 1.27
## PRE_GAD_4 0.76 0.30 0.69 0.69 0.31 0.84 1.37
## PRE_GAD_5 0.58 0.45 0.55 0.55 0.45 0.62 1.91
## PRE_GAD_6 0.57 0.82 1.00 1.00 0.00 0.32 1.78
## PRE_GAD_7 0.63 0.45 0.45 0.55 0.89 1.26
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 3.31 0.27 0.32 0.68 3.20
##
## general/max 1.04 max/min = 11.97
## mean percent general = 0.76 with sd = 0.22 and cv of 0.28
## Explained Common Variance of the general factor = 0.72
##
## The degrees of freedom are 3 and the fit is 0
## The number of observations was 259 with Chi Square = 0.57 with prob < 0.9
## The root mean square of the residuals is 0
## The df corrected root mean square of the residuals is 0.01
## RMSEA index = 0 and the 10 % confidence intervals are 0 0.044
## BIC = -16.1
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 14 and the fit is 0.13
## The number of observations was 259 with Chi Square = 32.43 with prob < 0.0035
## The root mean square of the residuals is 0.05
## The df corrected root mean square of the residuals is 0.06
##
## RMSEA index = 0.071 and the 10 % confidence intervals are 0.039 0.104
## BIC = -45.37
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.91 0.40 0.60 0.95
## Multiple R square of scores with factors 0.83 0.16 0.36 0.91
## Minimum correlation of factor score estimates 0.65 -0.67 -0.29 0.82
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.91 0.84 0.77 0.99
## Omega general for total scores and subscales 0.81 0.74 0.64 0.32
## Omega group for total scores and subscales 0.08 0.10 0.14 0.67
omega(W1_GAD_responses) # omega total = 0.92
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.9
## G.6: 0.89
## Omega Hierarchical: 0.83
## Omega H asymptotic: 0.9
## Omega Total 0.92
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## W1_GAD_1 0.71 0.20 0.57 0.57 0.43 0.89 1.24
## W1_GAD_2 0.77 0.41 0.76 0.76 0.24 0.78 1.52
## W1_GAD_3 0.77 0.36 0.73 0.73 0.27 0.82 1.41
## W1_GAD_4 0.82 0.57 1.00 1.00 0.00 0.68 1.78
## W1_GAD_5 0.58 0.20 0.40 0.40 0.60 0.85 1.36
## W1_GAD_6 0.66 0.38 0.58 0.58 0.42 0.75 1.59
## W1_GAD_7 0.70 0.22 0.55 0.55 0.45 0.89 1.26
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 3.64 0.34 0.25 0.35 3.22
##
## general/max 1.13 max/min = 13.04
## mean percent general = 0.81 with sd = 0.08 and cv of 0.1
## Explained Common Variance of the general factor = 0.79
##
## The degrees of freedom are 3 and the fit is 0
## The number of observations was 259 with Chi Square = 0.81 with prob < 0.85
## The root mean square of the residuals is 0.01
## The df corrected root mean square of the residuals is 0.01
## RMSEA index = 0 and the 10 % confidence intervals are 0 0.058
## BIC = -15.86
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 14 and the fit is 0.19
## The number of observations was 259 with Chi Square = 47.58 with prob < 1.5e-05
## The root mean square of the residuals is 0.06
## The df corrected root mean square of the residuals is 0.07
##
## RMSEA index = 0.096 and the 10 % confidence intervals are 0.067 0.127
## BIC = -30.22
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.92 0.59 0.53 0.83
## Multiple R square of scores with factors 0.85 0.35 0.28 0.68
## Minimum correlation of factor score estimates 0.70 -0.30 -0.44 0.37
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.92 0.86 0.74 1.00
## Omega general for total scores and subscales 0.83 0.73 0.64 0.67
## Omega group for total scores and subscales 0.06 0.13 0.11 0.32
omega(M1_GAD_responses) # omega total = 0.93
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.9
## G.6: 0.9
## Omega Hierarchical: 0.8
## Omega H asymptotic: 0.85
## Omega Total 0.94
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## M1_GAD_1 0.71 0.34 0.62 0.62 0.38 0.80 1.48
## M1_GAD_2 0.79 0.52 0.89 0.89 0.11 0.70 1.73
## M1_GAD_3 0.77 0.26 0.20 0.71 0.71 0.29 0.84 1.38
## M1_GAD_4 0.72 0.24 0.20 0.63 0.63 0.37 0.83 1.42
## M1_GAD_5 0.61 0.79 0.99 0.99 0.01 0.37 1.88
## M1_GAD_6 0.67 0.37 0.60 0.60 0.40 0.76 1.58
## M1_GAD_7 0.70 0.28 0.58 0.58 0.42 0.85 1.36
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 3.56 0.52 0.28 0.67 3.76
##
## general/max 0.95 max/min = 13.65
## mean percent general = 0.74 with sd = 0.17 and cv of 0.23
## Explained Common Variance of the general factor = 0.71
##
## The degrees of freedom are 3 and the fit is 0.01
## The number of observations was 259 with Chi Square = 3.74 with prob < 0.29
## The root mean square of the residuals is 0.01
## The df corrected root mean square of the residuals is 0.02
## RMSEA index = 0.031 and the 10 % confidence intervals are 0 0.114
## BIC = -12.93
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 14 and the fit is 0.37
## The number of observations was 259 with Chi Square = 93.42 with prob < 8.5e-14
## The root mean square of the residuals is 0.08
## The df corrected root mean square of the residuals is 0.1
##
## RMSEA index = 0.148 and the 10 % confidence intervals are 0.121 0.178
## BIC = 15.62
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.90 0.67 0.54 0.94
## Multiple R square of scores with factors 0.80 0.45 0.29 0.88
## Minimum correlation of factor score estimates 0.61 -0.10 -0.43 0.75
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.94 0.89 0.73 0.99
## Omega general for total scores and subscales 0.80 0.74 0.60 0.37
## Omega group for total scores and subscales 0.09 0.15 0.14 0.62
omega(M3_GAD_responses) # omega total = 0.93
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.91
## G.6: 0.9
## Omega Hierarchical: 0.82
## Omega H asymptotic: 0.88
## Omega Total 0.93
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## M3_GAD_1 0.70 0.29 0.59 0.59 0.41 0.82 1.43
## M3_GAD_2 0.83 0.22 0.22 0.80 0.80 0.20 0.87 1.31
## M3_GAD_3 0.73 0.65 0.95 0.95 0.05 0.55 1.99
## M3_GAD_4 0.73 0.33 0.66 0.66 0.34 0.81 1.46
## M3_GAD_5 0.66 0.33 0.58 0.58 0.42 0.76 1.64
## M3_GAD_6 0.64 0.46 0.46 0.54 0.90 1.22
## M3_GAD_7 0.78 0.34 0.72 0.72 0.28 0.84 1.37
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 3.70 0.37 0.55 0.15 3.40
##
## general/max 1.09 max/min = 22.75
## mean percent general = 0.79 with sd = 0.12 and cv of 0.15
## Explained Common Variance of the general factor = 0.78
##
## The degrees of freedom are 3 and the fit is 0.01
## The number of observations was 259 with Chi Square = 1.4 with prob < 0.71
## The root mean square of the residuals is 0.01
## The df corrected root mean square of the residuals is 0.01
## RMSEA index = 0 and the 10 % confidence intervals are 0 0.078
## BIC = -15.27
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 14 and the fit is 0.32
## The number of observations was 259 with Chi Square = 81.82 with prob < 1.3e-11
## The root mean square of the residuals is 0.07
## The df corrected root mean square of the residuals is 0.09
##
## RMSEA index = 0.137 and the 10 % confidence intervals are 0.109 0.166
## BIC = 4.03
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.91 0.53 0.86 0.45
## Multiple R square of scores with factors 0.83 0.28 0.75 0.21
## Minimum correlation of factor score estimates 0.66 -0.44 0.49 -0.59
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.93 0.83 0.91 0.72
## Omega general for total scores and subscales 0.82 0.72 0.69 0.60
## Omega group for total scores and subscales 0.07 0.11 0.22 0.11
omega(PRE_RTQ_responses) # omega total = 0.91
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs = np.obs, :
## The estimated weights for the factor scores are probably incorrect. Try a
## different factor score estimation method.
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.89
## G.6: 0.9
## Omega Hierarchical: 0.8
## Omega H asymptotic: 0.87
## Omega Total 0.91
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## PRE_RTQ_1 0.77 0.21 0.65 0.65 0.35 0.90 1.16
## PRE_RTQ_2 0.83 0.69 0.69 0.31 1.00 1.01
## PRE_RTQ_3 0.50 0.31 0.42 0.50 0.50 0.50 0.49 2.66
## PRE_RTQ_4 0.74 0.56 0.56 0.44 1.00 1.02
## PRE_RTQ_5 0.54 0.39 0.45 0.45 0.55 0.64 1.88
## PRE_RTQ_6 0.48 0.30 0.30 0.70 0.78 1.57
## PRE_RTQ_7 0.70 -0.21 0.55 0.55 0.45 0.90 1.25
## PRE_RTQ_8 0.55 0.62 0.68 0.68 0.32 0.44 1.98
## PRE_RTQ_9 0.62 0.56 0.70 0.70 0.30 0.54 1.99
## PRE_RTQ_10 0.67 0.21 0.50 0.50 0.50 0.89 1.25
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 4.22 0.00 1.05 0.31 3.25
##
## general/max 1.3 max/min = 1043.4
## mean percent general = 0.76 with sd = 0.21 and cv of 0.28
## Explained Common Variance of the general factor = 0.76
##
## The degrees of freedom are 18 and the fit is 0.11
## The number of observations was 259 with Chi Square = 26.64 with prob < 0.086
## The root mean square of the residuals is 0.02
## The df corrected root mean square of the residuals is 0.03
## RMSEA index = 0.043 and the 10 % confidence intervals are 0 0.076
## BIC = -73.38
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 35 and the fit is 0.7
## The number of observations was 259 with Chi Square = 177 with prob < 7e-21
## The root mean square of the residuals is 0.1
## The df corrected root mean square of the residuals is 0.11
##
## RMSEA index = 0.125 and the 10 % confidence intervals are 0.107 0.144
## BIC = -17.49
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.94 0.04 0.81 0.63
## Multiple R square of scores with factors 0.88 0.00 0.66 0.40
## Minimum correlation of factor score estimates 0.76 -1.00 0.32 -0.19
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.91 NA 0.82 0.84
## Omega general for total scores and subscales 0.80 NA 0.56 0.84
## Omega group for total scores and subscales 0.08 NA 0.27 0.01
omega(PRE_ERQ_responses) # omega total = 0.81
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.68
## G.6: 0.76
## Omega Hierarchical: 0.65
## Omega H asymptotic: 0.8
## Omega Total 0.81
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## PRE_ERQ_1 0.62 0.39 0.39 0.61 0.98 1.04
## PRE_ERQ_2- -0.61 0.38 0.38 0.62 0.02 1.04
## PRE_ERQ_3 0.78 0.62 0.62 0.38 0.99 1.02
## PRE_ERQ_4- -0.56 0.32 0.32 0.68 0.00 1.03
## PRE_ERQ_5 0.38 0.62 0.52 0.52 0.48 0.27 1.66
## PRE_ERQ_6- -0.80 0.64 0.64 0.36 0.00 1.01
## PRE_ERQ_7 0.68 0.50 0.50 0.50 0.92 1.17
## PRE_ERQ_8 0.66 0.45 0.64 0.64 0.36 0.68 1.78
## PRE_ERQ_9 0.65 0.43 0.43 0.57 0.00 1.02
## PRE_ERQ_10 0.76 0.30 0.67 0.67 0.33 0.86 1.32
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 2.62 0.01 1.75 0.73 2.75
##
## general/max 0.95 max/min = 331.26
## mean percent general = 0.47 with sd = 0.45 and cv of 0.96
## Explained Common Variance of the general factor = 0.51
##
## The degrees of freedom are 18 and the fit is 0.07
## The number of observations was 259 with Chi Square = 18.54 with prob < 0.42
## The root mean square of the residuals is 0.02
## The df corrected root mean square of the residuals is 0.03
## RMSEA index = 0.01 and the 10 % confidence intervals are 0 0.057
## BIC = -81.49
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 35 and the fit is 1.23
## The number of observations was 259 with Chi Square = 312.37 with prob < 3e-46
## The root mean square of the residuals is 0.17
## The df corrected root mean square of the residuals is 0.19
##
## RMSEA index = 0.175 and the 10 % confidence intervals are 0.158 0.193
## BIC = 117.88
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.91 0.06 0.88 0.73
## Multiple R square of scores with factors 0.83 0.00 0.78 0.53
## Minimum correlation of factor score estimates 0.65 -0.99 0.57 0.07
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.81 0.62 0.46 0.83
## Omega general for total scores and subscales 0.65 0.61 0.12 0.60
## Omega group for total scores and subscales 0.17 0.00 0.34 0.24
omega(Acceptability_responses) # omega total = 0.72
## Warning in cov2cor(t(w) %*% r %*% w): diag(V) had non-positive or NA entries;
## the non-finite result may be dubious
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.67
## G.6: 0.61
## Omega Hierarchical: 0.03
## Omega H asymptotic: 0.04
## Omega Total 0.72
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* F3* h2 h2 u2 p2 com
## B_acceptability_understandable 0.37 0.19 0.81 0.06 1.64
## B_acceptability_useful 0.82 0.72 0.72 0.28 0.04 1.11
## B_acceptability_recommend 0.73 0.56 0.56 0.44 0.02 1.12
##
## With Sums of squares of:
## g F1* F2* F3* h2
## 0.05 1.35 0.06 0.00 0.86
##
## general/max 0.04 max/min = Inf
## mean percent general = 0.04 with sd = 0.02 and cv of 0.5
## Explained Common Variance of the general factor = 0.04
##
## The degrees of freedom are -3 and the fit is 0
## The number of observations was 209 with Chi Square = 0 with prob < NA
## The root mean square of the residuals is 0
## The df corrected root mean square of the residuals is NA
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 0 and the fit is 0.55
## The number of observations was 209 with Chi Square = 112.85 with prob < NA
## The root mean square of the residuals is 0.41
## The df corrected root mean square of the residuals is NA
##
## Measures of factor score adequacy
## g F1* F2* F3*
## Correlation of scores with factors 0.18 0.88 0.31 0
## Multiple R square of scores with factors 0.03 0.77 0.10 0
## Minimum correlation of factor score estimates -0.93 0.53 -0.81 -1
##
## Total, General and Subset omega for each subset
## g F1* F2* F3*
## Omega total for total scores and subscales 0.72 0.71 NA NA
## Omega general for total scores and subscales 0.03 0.03 NA NA
## Omega group for total scores and subscales 0.69 0.69 NA NA
Note: 0 = not at all, 1 = somewhat, 2 = moderately, 3 = very much 3 (very much) was considered agreement with each item (e.g., 98 of the 103 mindset participants rated the training as “very much” understandable = 95.1% agreed it was easily understandable)
Understandable <- Acceptability %>%
group_by(Group) %>%
count(B_acceptability_understandable) %>%
ungroup()
Understandable
## # A tibble: 8 × 3
## Group B_acceptability_understandable n
## <chr> <dbl> <int>
## 1 B_Controls 0 1
## 2 B_Controls 1 1
## 3 B_Controls 2 7
## 4 B_Controls 3 94
## 5 B_Controls NA 3
## 6 C_Intervention 2 4
## 7 C_Intervention 3 98
## 8 C_Intervention NA 1
Useful <- Acceptability %>%
group_by(Group) %>%
count(B_acceptability_useful) %>%
ungroup()
Useful
## # A tibble: 8 × 3
## Group B_acceptability_useful n
## <chr> <dbl> <int>
## 1 B_Controls 0 1
## 2 B_Controls 2 7
## 3 B_Controls 3 94
## 4 B_Controls NA 4
## 5 C_Intervention 1 3
## 6 C_Intervention 2 8
## 7 C_Intervention 3 90
## 8 C_Intervention NA 2
Recommend <- Acceptability %>%
group_by(Group) %>%
count(B_acceptability_recommend) %>%
ungroup()
Recommend
## # A tibble: 9 × 3
## Group B_acceptability_recommend n
## <chr> <dbl> <int>
## 1 B_Controls 1 2
## 2 B_Controls 2 6
## 3 B_Controls 3 95
## 4 B_Controls NA 3
## 5 C_Intervention 0 1
## 6 C_Intervention 1 1
## 7 C_Intervention 2 9
## 8 C_Intervention 3 88
## 9 C_Intervention NA 4
IUS_BT_PRE_data <- read.csv("IUS_BT_PRE_data.csv") %>%
dplyr::select(-"X") %>%
rename("T01" = "T1",
"T02" = "T2",
"T03" = "T3",
"T04" = "T4",
"T05" = "T5",
"T06" = "T6",
"T07" = "T7",
"T08" = "T8",
"T09" = "T9",
"T10" = "T10")
# Excluding those who never make a choice (did not understand the task)
bt_pre_full <- filter(IUS_BT_PRE_data, ID != "8892522", ID != "8892570", ID != "8892628", ID != "8892668", ID != "8892681", ID != "8892779", ID != "8892794", ID != "8893157", ID != "8893186", ID != "9113535", ID != "9113549", ID != "9113550")
bt_pre_long <- bt_pre_full %>%
pivot_longer(cols = c(T01, T02, T03, T04, T05, T06, T07, T08, T09, T10),
names_to = "Trial_number",
values_to = "Samples") %>%
dplyr::select(-"Group")
IUS_BT_MEM <- lmer(Samples ~ A_PRE_IUS_total * Trial_number + (1|ID), data = bt_pre_long, REML = TRUE)
summary(IUS_BT_MEM)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Samples ~ A_PRE_IUS_total * Trial_number + (1 | ID)
## Data: bt_pre_long
##
## REML criterion at convergence: 11987
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -8.8760 -0.1927 -0.0189 0.1614 9.8009
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 11.890 3.448
## Residual 5.352 2.314
## Number of obs: 2470, groups: ID, 247
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 8.02878 1.28664 464.04216 6.240
## A_PRE_IUS_total -0.13906 0.02991 464.04217 -4.649
## Trial_numberT02 -0.86978 1.01379 2205.00005 -0.858
## Trial_numberT03 -2.24965 1.01379 2205.00005 -2.219
## Trial_numberT04 -2.71314 1.01379 2205.00006 -2.676
## Trial_numberT05 -3.92572 1.01379 2205.00005 -3.872
## Trial_numberT06 -5.13249 1.01379 2205.00005 -5.063
## Trial_numberT07 -5.76325 1.01379 2205.00005 -5.685
## Trial_numberT08 -6.06023 1.01379 2205.00005 -5.978
## Trial_numberT09 -6.12416 1.01379 2205.00005 -6.041
## Trial_numberT10 -6.72366 1.01379 2205.00005 -6.632
## A_PRE_IUS_total:Trial_numberT02 0.01258 0.02357 2205.00005 0.534
## A_PRE_IUS_total:Trial_numberT03 0.04690 0.02357 2205.00005 1.990
## A_PRE_IUS_total:Trial_numberT04 0.05194 0.02357 2205.00005 2.204
## A_PRE_IUS_total:Trial_numberT05 0.08315 0.02357 2205.00005 3.528
## A_PRE_IUS_total:Trial_numberT06 0.10008 0.02357 2205.00005 4.247
## A_PRE_IUS_total:Trial_numberT07 0.11670 0.02357 2205.00005 4.952
## A_PRE_IUS_total:Trial_numberT08 0.11942 0.02357 2205.00005 5.067
## A_PRE_IUS_total:Trial_numberT09 0.12363 0.02357 2205.00005 5.246
## A_PRE_IUS_total:Trial_numberT10 0.13460 0.02357 2205.00005 5.712
## Pr(>|t|)
## (Intercept) 9.87e-10 ***
## A_PRE_IUS_total 4.34e-06 ***
## Trial_numberT02 0.391014
## Trial_numberT03 0.026584 *
## Trial_numberT04 0.007500 **
## Trial_numberT05 0.000111 ***
## Trial_numberT06 4.48e-07 ***
## Trial_numberT07 1.48e-08 ***
## Trial_numberT08 2.63e-09 ***
## Trial_numberT09 1.79e-09 ***
## Trial_numberT10 4.15e-11 ***
## A_PRE_IUS_total:Trial_numberT02 0.593485
## A_PRE_IUS_total:Trial_numberT03 0.046725 *
## A_PRE_IUS_total:Trial_numberT04 0.027623 *
## A_PRE_IUS_total:Trial_numberT05 0.000427 ***
## A_PRE_IUS_total:Trial_numberT06 2.26e-05 ***
## A_PRE_IUS_total:Trial_numberT07 7.91e-07 ***
## A_PRE_IUS_total:Trial_numberT08 4.37e-07 ***
## A_PRE_IUS_total:Trial_numberT09 1.70e-07 ***
## A_PRE_IUS_total:Trial_numberT10 1.27e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation matrix not shown by default, as p = 20 > 12.
## Use print(x, correlation=TRUE) or
## vcov(x) if you need it
anova (IUS_BT_MEM)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## A_PRE_IUS_total 30.05 30.052 1 245 5.6146 0.01859 *
## Trial_number 531.93 59.103 9 2205 11.0425 < 2.2e-16 ***
## A_PRE_IUS_total:Trial_number 405.07 45.007 9 2205 8.4088 1.959e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(IUS_BT_MEM)
## # R2 for Mixed Models
##
## Conditional R2: 0.699
## Marginal R2: 0.032
parameters::standardise_parameters(IUS_BT_MEM)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ------------------------------------------------------------------
## (Intercept) | 0.15 | [ 0.03, 0.27]
## A PRE IUS total | -0.29 | [-0.42, -0.17]
## Trial number [T02] | -0.08 | [-0.18, 0.02]
## Trial number [T03] | -0.07 | [-0.16, 0.03]
## Trial number [T04] | -0.13 | [-0.22, -0.03]
## Trial number [T05] | -0.10 | [-0.20, 0.00]
## Trial number [T06] | -0.22 | [-0.32, -0.12]
## Trial number [T07] | -0.20 | [-0.30, -0.11]
## Trial number [T08] | -0.25 | [-0.34, -0.15]
## Trial number [T09] | -0.22 | [-0.32, -0.12]
## Trial number [T10] | -0.25 | [-0.35, -0.15]
## A PRE IUS total × Trial number [T02] | 0.03 | [-0.07, 0.12]
## A PRE IUS total × Trial number [T03] | 0.10 | [ 0.00, 0.20]
## A PRE IUS total × Trial number [T04] | 0.11 | [ 0.01, 0.21]
## A PRE IUS total × Trial number [T05] | 0.17 | [ 0.08, 0.27]
## A PRE IUS total × Trial number [T06] | 0.21 | [ 0.11, 0.31]
## A PRE IUS total × Trial number [T07] | 0.25 | [ 0.15, 0.34]
## A PRE IUS total × Trial number [T08] | 0.25 | [ 0.15, 0.35]
## A PRE IUS total × Trial number [T09] | 0.26 | [ 0.16, 0.36]
## A PRE IUS total × Trial number [T10] | 0.28 | [ 0.19, 0.38]
full_lmer_IUSBT <- lmer(Samples ~ A_PRE_IUS_total * Trial_number + (1|ID), data = bt_pre_long, REML = TRUE)
null_lmer_IUSBT <- update(full_lmer_IUSBT, formula = ~ . -Trial_number:A_PRE_IUS_total)
BF_BIC_IUSBT <- exp((BIC(null_lmer_IUSBT) - BIC(full_lmer_IUSBT))/2)
BF_BIC_IUSBT # interaction
## [1] 1.097912e-11
M2_lmer_IUSBT <- lmer(Samples ~ Trial_number + A_PRE_IUS_total + (1|ID), data = bt_pre_long, REML = TRUE)
null_lmer_IUSBT <- update(M2_lmer_IUSBT, formula = ~ . -A_PRE_IUS_total)
BF_BIC_IUSBT <- exp((BIC(null_lmer_IUSBT) - BIC(M2_lmer_IUSBT))/2)
BF_BIC_IUSBT # IUS
## [1] 0.0207647
M3_lmer_IUSBT <- lmer(Samples ~ Trial_number + A_PRE_IUS_total + (1|ID), data = bt_pre_long, REML = TRUE)
null_lmer_IUSBT <- update(M3_lmer_IUSBT, formula = ~ . -Trial_number)
BF_BIC_IUSBT <- exp((BIC(null_lmer_IUSBT) - BIC(M3_lmer_IUSBT))/2)
BF_BIC_IUSBT # trial_number
## [1] 1.414162e-07
bt_pre_long <- bt_pre_full %>%
pivot_longer(cols = c(T01, T02, T03, T04, T05, T06, T07, T08, T09, T10),
names_to = "Trial_number",
values_to = "Samples") %>%
dplyr::select(-"Group")
IUS_BT_association_fig <- bt_pre_long %>%
mutate(Trial_number=case_when(
Trial_number == "T01" ~ "Trial 1",
Trial_number == "T02" ~ "Trial 2",
Trial_number == "T03" ~ "Trial 3",
Trial_number == "T04" ~ "Trial 4",
Trial_number == "T05" ~ "Trial 5",
Trial_number == "T06" ~ "Trial 6",
Trial_number == "T07" ~ "Trial 7",
Trial_number == "T08" ~ "Trial 8",
Trial_number == "T09" ~ "Trial 9",
Trial_number == "T10" ~ "Trial 10")) %>%
mutate(Trial_number=factor(Trial_number, levels=c("Trial 1", "Trial 2", "Trial 3", "Trial 4", "Trial 5", "Trial 6", "Trial 7", "Trial 8", "Trial 9", "Trial 10"))) %>%
ggplot(aes(x = A_PRE_IUS_total, y = Samples, color = Trial_number, fill = Trial_number, group = Trial_number)) +
scale_y_continuous(name = "Baseline Behavioural Intolerance of Uncertainty") +
scale_x_continuous(name = "Baseline Cognitive Intolerance of Uncertainty") +
scale_color_discrete(name = "Trial Number") +
scale_fill_discrete(name = "Trial Number") +
theme_bw() +
theme(legend.position = "right") +
geom_smooth(se = TRUE, level = 0.95, alpha = 0.25) +
stat_summary(fun = mean, geom = "point") # Add points at the mean values
IUS_BT_association_fig
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
BT_avg <- read.csv("BT_avg.csv") %>%
filter(ID != "8892522", ID != "8892570", ID != "8892628", ID != "8892668", ID != "8892681", ID != "8892779", ID != "8892794", ID != "8893157", ID != "8893186", ID != "9113535", ID != "9113549", ID != "9113550")
BT_long <- BT_avg %>%
dplyr::select("ID", "Group", "A_PRE_sample_avg", "B_POST_sample_avg") %>%
pivot_longer(cols = c(A_PRE_sample_avg, B_POST_sample_avg),
names_to = "Time",
values_to = "BT_Score")
BT_MEM_BP <- lmer(BT_Score ~ Group * Time + (1|ID), data = BT_long, REML = TRUE)
summary(BT_MEM_BP)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: BT_Score ~ Group * Time + (1 | ID)
## Data: BT_long
##
## REML criterion at convergence: 2175.6
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.9264 -0.2398 -0.0766 0.0958 8.1574
##
## Random effects:
## Groups Name Variance Std.Dev.
## ID (Intercept) 3.54 1.881
## Residual 2.63 1.622
## Number of obs: 488, groups: ID, 246
##
## Fixed effects:
## Estimate Std. Error df
## (Intercept) 1.35745 0.36233 364.52720
## GroupB_Controls 0.36055 0.43930 364.52720
## GroupC_Intervention -0.19583 0.44001 364.52720
## TimeB_POST_sample_avg -0.05106 0.33457 240.38293
## GroupB_Controls:TimeB_POST_sample_avg -0.72867 0.40668 240.90582
## GroupC_Intervention:TimeB_POST_sample_avg -0.24873 0.40736 240.91479
## t value Pr(>|t|)
## (Intercept) 3.746 0.000208 ***
## GroupB_Controls 0.821 0.412330
## GroupC_Intervention -0.445 0.656542
## TimeB_POST_sample_avg -0.153 0.878821
## GroupB_Controls:TimeB_POST_sample_avg -1.792 0.074429 .
## GroupC_Intervention:TimeB_POST_sample_avg -0.611 0.542042
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) GrpB_C GrpC_I TB_POS GB_C:T
## GrpB_Cntrls -0.825
## GrpC_Intrvn -0.823 0.679
## TmB_POST_s_ -0.462 0.381 0.380
## GB_C:TB_POS 0.380 -0.461 -0.313 -0.823
## GC_I:TB_POS 0.379 -0.313 -0.460 -0.821 0.676
anova (BT_MEM_BP)
## Type III Analysis of Variance Table with Satterthwaite's method
## Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
## Group 3.2216 1.6108 2 243.67 0.6124 0.54290
## Time 15.3259 15.3259 1 241.18 5.8262 0.01653 *
## Group:Time 10.1876 5.0938 2 241.35 1.9364 0.14645
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
performance::r2(BT_MEM_BP)
## # R2 for Mixed Models
##
## Conditional R2: 0.580
## Marginal R2: 0.015
parameters::standardise_parameters(BT_MEM_BP)
## # Standardization method: refit
##
## Parameter | Std. Coef. | 95% CI
## ------------------------------------------------------------------------------
## (Intercept) | 0.06 | [-0.23, 0.35]
## Group [B_Controls] | 0.14 | [-0.20, 0.49]
## Group [C_Intervention] | -0.08 | [-0.43, 0.27]
## Time [B_POST_sample_avg] | -0.02 | [-0.28, 0.24]
## Group [B_Controls] × Time [B_POST_sample_avg] | -0.29 | [-0.61, 0.03]
## Group [C_Intervention] × Time [B_POST_sample_avg] | -0.10 | [-0.42, 0.22]
full_lmer_BT_BP <- lmer(BT_Score ~ Group * Time + (1|ID), data = BT_long, REML = TRUE)
null_lmer_BT_BP <- update(full_lmer_BT_BP, formula = ~ . -Group:Time)
BF_BIC_BT_BP <- exp((BIC(null_lmer_BT_BP) - BIC(full_lmer_BT_BP))/2)
BF_BIC_BT_BP # Interaction
## [1] 0.01086503
M2_lmer_BT_BP <- lmer(BT_Score ~ Group + Time + (1|ID), data = BT_long, REML = TRUE)
null_lmer_BT_BP <- update(M2_lmer_BT_BP, formula = ~ . -Group)
BF_BIC_BT_BP <- exp((BIC(null_lmer_BT_BP) - BIC(M2_lmer_BT_BP))/2)
BF_BIC_BT_BP # Group
## [1] 0.002687153
M3_lmer_BT_BP <- lmer(BT_Score ~ Group + Time + (1|ID), data = BT_long, REML = TRUE)
null_lmer_BT_BP <- update(M3_lmer_BT_BP, formula = ~ . -Time)
BF_BIC_BT_BP <- exp((BIC(null_lmer_BT_BP) - BIC(M3_lmer_BT_BP))/2)
BF_BIC_BT_BP # Time
## [1] 1.495944
BT <- BT_long %>%
mutate(Time=case_when(
Time == "A_PRE_sample_avg" ~ "Baseline",
Time == "B_POST_sample_avg" ~ "Post")) %>%
mutate(Time=factor(Time, levels=c("Baseline", "Post"))) %>%
mutate(Group=case_when(
Group == "A_ECs" ~ "\nNo-Training\nControl",
Group == "B_Controls" ~ "\nPsychoeducation\nControl",
Group == "C_Intervention" ~ "\nUncertainty-Mindsets\nTraining")) %>%
mutate(Group=factor(Group, levels=c("\nNo-Training\nControl", "\nPsychoeducation\nControl", "\nUncertainty-Mindsets\nTraining"))) %>%
ggplot(aes(x = Time, y = BT_Score, color = Group, fill = Group, group = Group)) +
#stat_summary(fun = mean, geom = "line") + # Calculate and plot the mean as a line
stat_summary(fun = mean, geom = "point") + # Add points at the mean values
scale_y_continuous(name = "Behavioral Intolerance of Uncertainty") +
theme_bw() +
theme(legend.position = "left") +
geom_smooth(method = "lm", se = TRUE, level = 0.95, alpha = 0.25)
BT_gg <- ggMarginal(BT,groupColour = TRUE, groupFill = TRUE, type = "density")
## Warning: Removed 4 rows containing non-finite outside the scale range
## (`stat_summary()`).
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 4 rows containing non-finite outside the scale range (`stat_smooth()`).
## Removed 4 rows containing non-finite outside the scale range
## (`stat_summary()`).
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 4 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x < range[1], value =
## "Baseline"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x > range[2], value =
## "Post"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x < range[1], value =
## "Baseline"): NAs introduced by coercion
## Warning in `[<-.mapped_discrete`(`*tmp*`, finite & x > range[2], value =
## "Post"): NAs introduced by coercion
## Warning: Removed 6 rows containing non-finite outside the scale range
## (`stat_density()`).
## Removed 6 rows containing non-finite outside the scale range
## (`stat_density()`).
## Warning: No shared levels found between `names(values)` of the manual scale and the
## data's colour values.
## Warning: No shared levels found between `names(values)` of the manual scale and the
## data's fill values.
BT_gg