This document summarizes the analyses which test for between study moderation.
Variable | b | CI_l | CI_u | p | b | CI_l | CI_u | p | b | CI_l | CI_u | p |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Diabetes - moderated by personality | ||||||||||||
intrcpt | -0.01 | -0.13 | 0.11 | .831 | -0.01 | -0.14 | 0.12 | .922 | -0.01 | -0.14 | 0.11 | .865 |
personality_q | 0.19 | -0.17 | 0.54 | .303 | 0.18 | -0.19 | 0.55 | .345 | 0.21 | -0.16 | 0.58 | .269 |
personality_qBFI | 0.18 | -0.13 | 0.49 | .258 | 0.20 | -0.12 | 0.52 | .222 | 0.21 | -0.11 | 0.53 | .190 |
personality_qMIDI | -0.02 | -0.15 | 0.12 | .785 | -0.02 | -0.17 | 0.12 | .745 | -0.01 | -0.15 | 0.13 | .869 |
personality_qNEO-FFI | -0.09 | -0.25 | 0.08 | .298 | -0.10 | -0.28 | 0.08 | .280 | -0.10 | -0.28 | 0.07 | .253 |
Diabetes - moderated by average number of years | ||||||||||||
intrcpt | -0.01 | -0.16 | 0.14 | .883 | 0.00 | -0.18 | 0.17 | .959 | 0.01 | -0.16 | 0.17 | .930 |
mean_year | 0.00 | -0.02 | 0.02 | .742 | 0.00 | -0.03 | 0.02 | .749 | 0.00 | -0.03 | 0.02 | .656 |
Diabetes - moderated by maximum number of years | ||||||||||||
intrcpt | 0.01 | -0.12 | 0.13 | .928 | 0.01 | -0.13 | 0.15 | .888 | 0.02 | -0.12 | 0.16 | .764 |
max_year | 0.00 | -0.01 | 0.01 | .475 | 0.00 | -0.01 | 0.01 | .530 | 0.00 | -0.01 | 0.01 | .434 |
Hypertension - moderated by personality | ||||||||||||
intrcpt | -0.10 | -0.20 | 0.00 | .054 | -0.10 | -0.21 | 0.00 | .058 | -0.11 | -0.22 | 0.00 | .046 |
personality_q | 0.20 | -0.05 | 0.45 | .123 | 0.19 | -0.07 | 0.44 | .147 | 0.18 | -0.08 | 0.44 | .177 |
personality_qBFI | 0.08 | -0.04 | 0.19 | .185 | 0.08 | -0.03 | 0.20 | .165 | 0.09 | -0.03 | 0.20 | .134 |
personality_qMIDI | 0.09 | -0.02 | 0.20 | .102 | 0.09 | -0.03 | 0.20 | .130 | 0.09 | -0.02 | 0.21 | .110 |
personality_qNEO-FFI | 0.11 | -0.03 | 0.26 | .118 | 0.11 | -0.04 | 0.26 | .152 | 0.12 | -0.03 | 0.27 | .109 |
Hypertension - moderated by average number of years | ||||||||||||
intrcpt | -0.02 | -0.08 | 0.03 | .454 | -0.03 | -0.09 | 0.02 | .229 | -0.03 | -0.09 | 0.02 | .227 |
mean_year | 0.00 | 0.00 | 0.01 | .846 | 0.00 | 0.00 | 0.01 | .531 | 0.00 | 0.00 | 0.01 | .535 |
Hypertension - moderated by maximum number of years | ||||||||||||
intrcpt | -0.05 | -0.12 | 0.02 | .165 | -0.06 | -0.14 | 0.01 | .083 | -0.06 | -0.14 | 0.01 | .092 |
max_year | 0.00 | 0.00 | 0.01 | .311 | 0.00 | 0.00 | 0.01 | .185 | 0.00 | 0.00 | 0.01 | .207 |
Heart Disease - moderated by personality | ||||||||||||
intrcpt | 0.09 | -0.13 | 0.31 | .432 | 0.08 | -0.16 | 0.31 | .521 | 0.07 | -0.16 | 0.31 | .549 |
personality_q | -0.03 | -0.34 | 0.28 | .850 | -0.03 | -0.36 | 0.30 | .870 | -0.05 | -0.39 | 0.28 | .754 |
personality_qBFI | -0.08 | -0.31 | 0.16 | .522 | -0.07 | -0.33 | 0.18 | .579 | -0.06 | -0.32 | 0.19 | .633 |
personality_qMIDI | -0.12 | -0.35 | 0.10 | .293 | -0.13 | -0.37 | 0.12 | .307 | -0.12 | -0.36 | 0.12 | .336 |
personality_qNEO-FFI | -0.10 | -0.35 | 0.16 | .457 | -0.08 | -0.35 | 0.19 | .556 | -0.07 | -0.34 | 0.20 | .614 |
Heart Disease - moderated by average number of years | ||||||||||||
intrcpt | -0.06 | -0.11 | 0.00 | .047 | -0.09 | -0.16 | -0.01 | .019 | -0.08 | -0.15 | -0.01 | .021 |
mean_year | 0.01 | 0.00 | 0.01 | .048 | 0.01 | 0.00 | 0.01 | .030 | 0.01 | 0.00 | 0.01 | .030 |
Heart Disease - moderated by maximum number of years | ||||||||||||
intrcpt | -0.08 | -0.15 | -0.01 | .034 | -0.11 | -0.19 | -0.03 | .009 | -0.10 | -0.18 | -0.02 | .012 |
max_year | 0.01 | 0.00 | 0.01 | .039 | 0.01 | 0.00 | 0.01 | .014 | 0.01 | 0.00 | 0.01 | .018 |
The following packages were used to generate this table:
library(tidyverse)
library(metafor)
library(knitr)
library(kableExtra)
library(papaja)
library(here)
First we load and summarize the diabetes data.
load(here("chronic/meta output/diabetes_long_mods.Rdata"))
diabetes.models = expand.grid(model = c("mod1", "mod2", "mod3"),
variable = c("personality", "mean years", "max years"))
diabetes.models$output = list(mods.p.mod1, mods.p.mod2, mods.p.mod3,
mods.mean.mod1, mods.mean.mod2, mods.mean.mod3,
mods.max.mod1, mods.max.mod2, mods.max.mod3)
summary = diabetes.models %>%
mutate(summary = map(output, function(x) coef(summary(x)))) %>%
mutate(summary = map(summary, ~mutate(., var = rownames(.)))) %>%
dplyr::select(-output) %>%
unnest() %>%
mutate(outcome = "diabetes")
Next we load and summarize the high blood pressure data.
rm(list = setdiff(ls(), "summary"))
load(here("chronic/meta output/hbp_long_mods.Rdata"))
hbp.models = expand.grid(model = c("mod1", "mod2", "mod3"),
variable = c("personality", "mean years", "max years"))
hbp.models$output = list(mods.p.mod1, mods.p.mod2, mods.p.mod3,
mods.mean.mod1, mods.mean.mod2, mods.mean.mod3,
mods.max.mod1, mods.max.mod2, mods.max.mod3)
summary = hbp.models %>%
mutate(summary = map(output, function(x) coef(summary(x)))) %>%
mutate(summary = map(summary, ~mutate(., var = rownames(.)))) %>%
dplyr::select(-output) %>%
unnest() %>%
mutate(outcome = "hbp") %>%
full_join(summary)
Finally we load and summarize the heart condition data.
rm(list = setdiff(ls(), "summary"))
load(here("chronic/meta output/heart_long_mods.Rdata"))
heart.models = expand.grid(model = c("mod1", "mod2", "mod3"),
variable = c("personality", "mean years", "max years"))
heart.models$output = list(mods.p.mod1, mods.p.mod2, mods.p.mod3,
mods.mean.mod1, mods.mean.mod2, mods.mean.mod3,
mods.max.mod1, mods.max.mod2, mods.max.mod3)
summary = heart.models %>%
mutate(summary = map(output, function(x) coef(summary(x)))) %>%
mutate(summary = map(summary, ~mutate(., var = rownames(.)))) %>%
dplyr::select(-output) %>%
unnest() %>%
mutate(outcome = "heart") %>%
full_join(summary)
summary %>%
dplyr::select(-se, -zval) %>%
gather("key", "value", -model, -var, -outcome, -variable) %>%
unite("key", "model", "key", sep="_") %>%
spread("key", "value") %>%
arrange(outcome, variable, var) %>%
dplyr::select(var,
mod1_estimate, mod1_ci.lb, mod1_ci.ub, mod1_pval,
mod2_estimate, mod2_ci.lb, mod2_ci.ub, mod2_pval,
mod3_estimate, mod3_ci.lb, mod3_ci.ub, mod3_pval) %>%
mutate(mod1_pval = printp(mod1_pval),
mod2_pval = printp(mod2_pval),
mod3_pval = printp(mod3_pval)) %>%
kable(., digits = 2, booktabs = T, escape = FALSE,
col.names = c("Variable", rep(c("b", "CI_l", "CI_u", "p"), 3))) %>%
kable_styling() %>%
add_header_above(c(" " = 1, "Model 1" = 4, "Model 2" = 4, "Model 3" = 4)) %>%
group_rows("Diabetes - moderated by personality", 1, 5) %>%
group_rows("Diabetes - moderated by average number of years", 6, 7) %>%
group_rows("Diabetes - moderated by maximum number of years", 8, 9) %>%
group_rows("Hypertension - moderated by personality", 10, 14) %>%
group_rows("Hypertension - moderated by average number of years", 15, 16) %>%
group_rows("Hypertension - moderated by maximum number of years", 17, 18) %>%
group_rows("Heart Disease - moderated by personality", 19, 23) %>%
group_rows("Heart Disease - moderated by average number of years", 24, 25) %>%
group_rows("Heart Disease - moderated by maximum number of years", 26, 27)