Population as analysis unit
In this section, we cover the workflow described in Figure 1.1C and D.
Loop through meta-analyses on all traits
This section covers Figure 1.1 C, by conducting a meta-analysis for all traits and producing the meta-analysed effect sizes (lnVR, lnCVR and lnRR).
- The loop combines the functions mentioned above and fills the data matrix with results from our meta analysis.
- Error messages indicate traits that either did not reach convergence, or that did not return meaningful results in the meta-analysis, due to absence of variance. Those traits will be removed in later steps, outlined below.
n <- length(unique(data$id))
# Create dataframe to store results
results_alltraits_grouping <- data.frame(tibble(id = 1:n, lnCVR = 0, lnCVR_lower = 0,
lnCVR_upper = 0, lnCVR_se = 0, lnCVR_I2 = 0, lnVR = 0, lnVR_lower = 0, lnVR_upper = 0,
lnVR_se = 0, lnVR_I2 = 0, lnRR = 0, lnRR_lower = 0, lnRR_upper = 0, lnRR_se = 0,
lnRR_I2 = 0, k = 0, trait = 0, male_N = 0, female_N = 0, min_male_N = 0, max_male_N = 0,
mean_male_N = 0, min_female_N = 0, max_female_N = 0, mean_female_N = 0))
for (t in 1:n) {
tryCatch({
results <- data %>% data_subset_parameterid_individual_by_age(t) %>% calculate_population_stats() %>%
create_meta_analysis_effect_sizes() %>% mutate(err = seq_len(n()))
# lnCVR, log repsonse-ratio of the coefficient of variance
cvr <- metafor::rma.mv(yi = effect_size_CVR, V = sample_variance_CVR, random = list(~1 |
strain_name, ~1 | production_center, ~1 | err), control = list(optimizer = "optim",
optmethod = "Nelder-Mead", maxit = 1000), verbose = F, data = results)
# lnVR, comparison of standard deviations
cv <- metafor::rma.mv(yi = effect_size_VR, V = sample_variance_VR, random = list(~1 |
strain_name, ~1 | production_center, ~1 | err), control = list(optimizer = "optim",
optmethod = "Nelder-Mead", maxit = 1000), verbose = F, data = results)
# for means, lnRR
means <- metafor::rma.mv(yi = effect_size_ROM, V = sample_variance_ROM, random = list(~1 |
strain_name, ~1 | production_center, ~1 | err), control = list(optimizer = "optim",
optmethod = "Nelder-Mead", maxit = 1000), verbose = F, data = results)
f <- function(x) unlist(x[c("b", "ci.lb", "ci.ub", "se")])
extract_I2 <- function(mod) {
sigma2 <- mod$sigma2
w <- mod$vi
k <- mod$k
sigmaM <- sum(w * (k - 1))/(sum(w)^2 - sum(w^2))
I2_tot <- round(sum(sigma2)/sum(sigma2 + sigmaM), digits = 3) * 100
return(I2_tot)
}
results_alltraits_grouping[t, c(2:17, 19:26)] <- c(f(cvr), lnCVR_I2 = extract_I2(cvr),
f(cv), lnVR_I2 = extract_I2(cv), f(means), lnRR_I2 = extract_I2(means),
k = means$k, male_N = sum(results$male_n_ind), female_N = sum(results$female_n_ind),
min_male_N = min(results$male_n_ind), max_male_N = max(results$male_n_ind),
mean_male_N = mean(results$male_n_ind), min_female_N = min(results$female_n_ind),
max_female_N = max(results$female_n_ind), mean_female_N = mean(results$female_n_ind))
results_alltraits_grouping[t, 18] <- unique(results$trait)
}, error = function(e) {
cat("ERROR :", t, conditionMessage(e), "\n")
})
}
## ERROR : 84 Optimizer (optim) did not achieve convergence (convergence = 10).
## ERROR : 160 Processing terminated since k <= 1.
## ERROR : 168 Processing terminated since k <= 1.
In the above function, we use ‘tryCatch’ and ‘conditionMessage’ to prevent the loop from aborting when the first error at row 84 is produced. As convergence in the two listed non-converging cases can’t be achieved by sensibly tweaking (other optim etc.), and we only learn about non-convergence in the loop, it is not possible to exclude the traits (N = 2) beforehand.Similarly, there are 8 traits with very low variation, which can not be excluded prior to running the loop.
Any produced “Warnings” indicate cases where variance components are set to zero during likelihood optimization.
Merging datasets & removal of non-converged traits
Here we cover Figure 1.1D, removing non-coverging model results and non-informative traits. Procedure names, grouping variables and trait names (“parameter_names”) are the merged back together with the results from the metafor analysis above.
results_alltraits_grouping2 <- results_alltraits_grouping %>%
# Join data with results_alltraits_grouping. We filter duplicated id's to get
# only one unique row per id (and there is one id per parameter_name)
left_join(by = "id", data %>% select(id, parameter_group, procedure = procedure_name,
procedure_name, parameter_name) %>% filter(!duplicated(id))) %>%
# Below we add 'procedure' (from the previously loaded 'procedures.csv') as a
# variable; n <- length(unique(results_alltraits_grouping2$parameter_name)))
# should equal 232
left_join(by = "procedure", procedures %>% distinct())
# We exclude 14 parameter names for which metafor models didn't converge ('dp t
# cells', 'mzb (cd21/35 high)'), and of parameters that don't harbour enough
# variation
meta_clean <- results_alltraits_grouping2 %>% filter(!parameter_name %in% c("dp t cells",
"mzb (cd21/35 high)", "number of caudal vertebrae", "number of cervical vertebrae",
"number of digits", "number of lumbar vertebrae", "number of pelvic vertebrae",
"number of ribs left", "number of ribs right", "number of signals", "number of thoracic vertebrae",
"total number of acquired events in panel a", "total number of acquired events in panel b",
"whole arena permanence"))
# Summary of the cleaned data for 218 traits
sd(meta_clean$k)
range(meta_clean$male_N)
range(meta_clean$female_N)
range(meta_clean$lnCVR_I2)
range(meta_clean$lnVR_I2)
range(meta_clean$lnRR_I2)
range(meta_clean$k)
mean(meta_clean$mean_male_N)
range(meta_clean$min_male_N)
median(meta_clean$mean_male_N)
sd(meta_clean$mean_male_N)
sd(meta_clean$mean_male_N)/sqrt(length(meta_clean$mean_male_N))
mean(meta_clean$mean_female_N)
median(meta_clean$mean_female_N)
range(meta_clean$min_female_N)
sd(meta_clean$mean_female_N)
sd(meta_clean$mean_female_N)/sqrt(length(meta_clean$mean_female_N))
A total of 14 traits from the original 232 that had been included are removed because they either did not achieve convergence or are nonsensical for analysis of variance (such as traits that show no variation, see list below).
The traits where models did not converge include: “dp t cells”, “mzb (cd21/35 high)”
The traits where there was not enough variation include: “number of caudal vertebrae”, “number of cervical vertebrae”, “number of digits”, “number of lumbar vertebrae”, “number of pelvic vertebrae”, “number of ribs left”,“number of ribs right”, “number of signals”, “number of thoracic vertebrae”, “total number of acquired events in panel a”,“total number of acquired events in panel b”, “whole arena permanence”.
Second-order meta-analysis of heterogenity
To see how much heterogeneity there is for each trait across different populations on average (for different functional groups and overall), we also conducted secondary meta-analyses by combining the total heterogeneities. More specifically, we combined the logarithm of the sum of the three variance components (Strain, Location and Unit; see above) with 1/2(N[effect size] - 1) as the sampling variance via the random effect model. That is, we conducted 3 sets of 10 secondary meta-analyses as with those of mean effect sizes for each trait, i.e. meta-analyzing log(total heterogeneities) for 9 functional groups and all the groups combined (Figure 1.1I). The analysis for heterogeneity follows the workflow of the above steps for the different meta-analyses and specifically Figure 1.1I & J. However, in the initial meta-analysis we extract sigma^2 and errors for mouse strains and centers (Institutions). As above a Loop is run and parameters extracted from metafor (sigma2’s, s.nlevels)
### Preparing heterogeneity
# Create dataframe to store results
results.allhetero.grouping <- as.data.frame(cbind(c(1:n), matrix(rep(0, n * 30),
ncol = 30)))
names(results.allhetero.grouping) <- c("id", "sigma2_strain.CVR", "sigma2_center.CVR",
"sigma2_error.CVR", "s.nlevels.strain.CVR", "s.nlevels.center.CVR", "s.nlevels.error.CVR",
"sigma2_strain.VR", "sigma2_center.VR", "sigma2_error.VR", "s.nlevels.strain.VR",
"s.nlevels.center.VR", "s.nlevels.error.VR", "sigma2_strain.RR", "sigma2_center.RR",
"sigma2_error.RR", "s.nlevels.strain.RR", "s.nlevels.center.RR", "s.nlevels.error.RR",
"lnCVR", "lnCVR_lower", "lnCVR_upper", "lnCVR_se", "lnVR", "lnVR_lower", "lnVR_upper",
"lnVR_se", "lnRR", "lnRR_lower", "lnRR_upper", "lnRR_se")
# Loop
for (t in 1:n) {
tryCatch({
results <- data %>% data_subset_parameterid_individual_by_age(t) %>% calculate_population_stats() %>%
create_meta_analysis_effect_sizes() %>% mutate(err = seq_len(n()))
# lnCVR, logaritm of the ratio of male and female coefficients of variance
cvr. <- metafor::rma.mv(yi = effect_size_CVR, V = sample_variance_CVR, random = list(~1 |
strain_name, ~1 | production_center, ~1 | err), control = list(optimizer = "optim",
optmethod = "Nelder-Mead", maxit = 1000), data = results)
results.allhetero.grouping[t, 2] <- cvr.$sigma2[1]
results.allhetero.grouping[t, 3] <- cvr.$sigma2[2]
results.allhetero.grouping[t, 4] <- cvr.$sigma2[3]
results.allhetero.grouping[t, 5] <- cvr.$s.nlevels[1]
results.allhetero.grouping[t, 6] <- cvr.$s.nlevels[2]
results.allhetero.grouping[t, 7] <- cvr.$s.nlevels[3]
results.allhetero.grouping[t, 20] <- cvr.$b
results.allhetero.grouping[t, 21] <- cvr.$ci.lb
results.allhetero.grouping[t, 22] <- cvr.$ci.ub
results.allhetero.grouping[t, 23] <- cvr.$se
# lnVR, male to female variability ratio (logarithm of male and female standard
# deviations)
vr. <- metafor::rma.mv(yi = effect_size_VR, V = sample_variance_VR, random = list(~1 |
strain_name, ~1 | production_center, ~1 | err), control = list(optimizer = "optim",
optmethod = "Nelder-Mead", maxit = 1000), data = results)
results.allhetero.grouping[t, 8] <- vr.$sigma2[1]
results.allhetero.grouping[t, 9] <- vr.$sigma2[2]
results.allhetero.grouping[t, 10] <- vr.$sigma2[3]
results.allhetero.grouping[t, 11] <- vr.$s.nlevels[1]
results.allhetero.grouping[t, 12] <- vr.$s.nlevels[2]
results.allhetero.grouping[t, 13] <- vr.$s.nlevels[3]
results.allhetero.grouping[t, 24] <- vr.$b
results.allhetero.grouping[t, 25] <- vr.$ci.lb
results.allhetero.grouping[t, 26] <- vr.$ci.ub
results.allhetero.grouping[t, 27] <- vr.$se
# lnRR, response ratio (logarithm of male and female means)
rr. <- metafor::rma.mv(yi = effect_size_ROM, V = sample_variance_ROM, random = list(~1 |
strain_name, ~1 | production_center, ~1 | err), control = list(optimizer = "optim",
optmethod = "Nelder-Mead", maxit = 1000), data = results)
results.allhetero.grouping[t, 14] <- rr.$sigma2[1]
results.allhetero.grouping[t, 15] <- rr.$sigma2[2]
results.allhetero.grouping[t, 16] <- rr.$sigma2[3]
results.allhetero.grouping[t, 17] <- rr.$s.nlevels[1]
results.allhetero.grouping[t, 18] <- rr.$s.nlevels[2]
results.allhetero.grouping[t, 19] <- rr.$s.nlevels[3]
results.allhetero.grouping[t, 28] <- rr.$b
results.allhetero.grouping[t, 29] <- rr.$ci.lb
results.allhetero.grouping[t, 30] <- rr.$ci.ub
results.allhetero.grouping[t, 31] <- rr.$se
}, error = function(e) {
cat("ERROR :", conditionMessage(e), "\n")
})
}
## ERROR : Optimizer (optim) did not achieve convergence (convergence = 10).
## ERROR : Processing terminated since k <= 1.
## ERROR : Processing terminated since k <= 1.
Here we exclude traits without variation between mouse strains and merge data sets containing metafor results with procedure etc. names. Dealing with the correlated parameters, and running the second -order meta-analysis for heterogeneity data (Figure 1.1I)
results.allhetero.grouping2 <- results.allhetero.grouping[results.allhetero.grouping$s.nlevels.strain.VR != 0, ]
# nrow(results.allhetero.grouping) #232
# Merging dataset with correct procedure names
# procedures <- read.csv(here("export", "procedures.csv"))
results.allhetero.grouping2$parameter_group <- data$parameter_group[match(results.allhetero.grouping2$id, data$id)]
results.allhetero.grouping2$procedure <- data$procedure_name[match(results.allhetero.grouping2$id, data$id)]
results.allhetero.grouping2$GroupingTerm <- procedures$GroupingTerm[match(results.allhetero.grouping2$procedure, procedures$procedure)]
results.allhetero.grouping2$parameter_name <- data$parameter_name[match(results.allhetero.grouping2$id, data$id)]
#We deal with correlated parameters following the procedures described above (extraction of effects sizes).
metahetero1 <- results.allhetero.grouping2
# length(unique(metahetero1$procedure)) #19
# length(unique(metahetero1$GroupingTerm)) #9
# length(unique(metahetero1$parameter_group)) #152
# length(unique(metahetero1$parameter_name)) #223
# Count of number of parameter names (correlated sub-traits) in each parameter group (par_group_size)
metahetero1b <- metahetero1 %>%
group_by(parameter_group) %>%
mutate(par_group_size = n_distinct(parameter_name))
metahetero1$par_group_size <- metahetero1b$par_group_size[match(metahetero1$parameter_group, metahetero1b$parameter_group)]
# Create subsets with > 1 count (par_group_size > 1)
metahetero1_sub <- subset(metahetero1, par_group_size > 1) # 92 observations
# Nest data
n_count. <- metahetero1_sub %>%
group_by(parameter_group) %>%
nest()
# meta-analysis preparation
model_count. <- n_count. %>%
mutate(
model_lnRR = map(data, ~ robu(.x$lnRR ~ 1,
data = .x, studynum = .x$id, modelweights = c("CORR"), rho = 0.8,
small = TRUE, var.eff.size = (.x$lnRR_se)^2
)),
model_lnVR = map(data, ~ robu(.x$lnVR ~ 1,
data = .x, studynum = .x$id, modelweights = c("CORR"), rho = 0.8,
small = TRUE, var.eff.size = (.x$lnVR_se)^2
)),
model_lnCVR = map(data, ~ robu(.x$lnCVR ~ 1,
data = .x, studynum = .x$id, modelweights = c("CORR"), rho = 0.8,
small = TRUE, var.eff.size = (.x$lnCVR_se)^2
))
)
# Robumeta object details: str(model_count.$model_lnCVR[[1]])
# Perform meta-analyses on correlated sub-traits, using robumeta
# Extract and save parameter estimates
count_fun. <- function(mod_sub) {
return(c(as.numeric(mod_sub$mod_info$term1), mod_sub$N))
}
robusub_RR. <- model_count. %>%
transmute(estimatelnRR = map(model_lnRR, count_fun.)) %>%
mutate(r = map(estimatelnRR, ~ data.frame(t(.)))) %>%
unnest(r) %>%
select(-estimatelnRR) %>%
purrr::set_names(c("parameter_group", "var.RR", "N.RR"))
robusub_CVR. <- model_count. %>%
transmute(estimatelnCVR = map(model_lnCVR, count_fun.)) %>%
mutate(r = map(estimatelnCVR, ~ data.frame(t(.)))) %>%
unnest(r) %>%
select(-estimatelnCVR) %>%
purrr::set_names(c("parameter_group", "var.CVR", "N.CVR"))
robusub_VR. <- model_count. %>%
transmute(estimatelnVR = map(model_lnVR, count_fun.)) %>%
mutate(r = map(estimatelnVR, ~ data.frame(t(.)))) %>%
unnest(r) %>%
select(-estimatelnVR) %>%
purrr::set_names(c("parameter_group", "var.VR", "N.VR"))
robu_all. <- full_join(robusub_CVR., robusub_VR.) %>% full_join(., robusub_RR.)
#Merge the two data sets (the new [robu_all.] and the initial [uncorrelated sub-traits with count = 1])
#In this step, we 1) merge the N from robumeta and the N from metafor (s.nlevels.error) together into the same columns (N.RR, N.VR, N.CVR)
# 2) calculate the total variance for metafor models as the sum of random effect variances and the residual error, then add in the same columns together with the residual variances from robumeta
metahetero_all <- metahetero1 %>%
filter(par_group_size == 1) %>%
as_tibble()
metahetero_all$N.RR <- metahetero_all$s.nlevels.error.RR
metahetero_all$N.CVR <- metahetero_all$s.nlevels.error.CVR
metahetero_all$N.VR <- metahetero_all$s.nlevels.error.VR
metahetero_all$var.RR <- log(sqrt(metahetero_all$sigma2_strain.RR + metahetero_all$sigma2_center.RR + metahetero_all$sigma2_error.RR))
metahetero_all$var.VR <- log(sqrt(metahetero_all$sigma2_strain.VR + metahetero_all$sigma2_center.VR + metahetero_all$sigma2_error.VR))
metahetero_all$var.CVR <- log(sqrt(metahetero_all$sigma2_strain.CVR + metahetero_all$sigma2_center.CVR + metahetero_all$sigma2_error.CVR))
# str(metahetero_all)
# str(robu_all.)
metahetero_all <- metahetero_all %>% mutate(
var.RR = if_else(var.RR == -Inf, -7, var.RR), # numbers chosen as limits; based on the values in the dataset
var.VR = if_else(var.VR == -Inf, -5, var.VR),
var.CVR = if_else(var.CVR == -Inf, -6, var.CVR)
)
# Combine data
# Step1
combinedmetahetero <- bind_rows(robu_all., metahetero_all)
# glimpse(combinedmetahetero)
# Steps 2&3
metacombohetero <- combinedmetahetero
metacombohetero$counts <- metahetero1$par_group_size[match(metacombohetero$parameter_group, metahetero1$parameter_group)]
metacombohetero$procedure2 <- metahetero1$procedure[match(metacombohetero$parameter_group, metahetero1$parameter_group)]
metacombohetero$GroupingTerm2 <- metahetero1$GroupingTerm[match(metacombohetero$parameter_group, metahetero1$parameter_group)]
# **Clean-up and rename
metacombohetero <- metacombohetero %>% select(parameter_group, var.CVR, N.CVR, var.VR, N.VR, var.RR, N.RR, counts, procedure = procedure2, GroupingTerm = GroupingTerm2)
# Invidual table for heterogeneity across all traits
kable(metacombohetero,, digits = 3) %>%
kable_styling() %>%
scroll_box(width = "100%", height = "200px")
parameter_group
|
var.CVR
|
N.CVR
|
var.VR
|
N.VR
|
var.RR
|
N.RR
|
counts
|
procedure
|
GroupingTerm
|
pre-pulse inhibition
|
0.004
|
5
|
0.000
|
5
|
0.000
|
5
|
5
|
Acoustic Startle and Pre-pulse Inhibition (PPI)
|
Behaviour
|
B cells
|
0.000
|
4
|
0.000
|
4
|
0.002
|
4
|
4
|
Immunophenotyping
|
Immunology
|
cd4 nkt
|
-0.014
|
6
|
-0.012
|
6
|
0.018
|
6
|
6
|
Immunophenotyping
|
Immunology
|
cd4 t
|
0.005
|
7
|
0.003
|
7
|
0.001
|
7
|
7
|
Immunophenotyping
|
Immunology
|
cd8 nkt
|
-0.008
|
6
|
0.003
|
6
|
-0.003
|
6
|
6
|
Immunophenotyping
|
Immunology
|
cd8 t
|
0.004
|
7
|
0.001
|
7
|
0.000
|
7
|
7
|
Immunophenotyping
|
Immunology
|
cdcs
|
-0.002
|
2
|
-0.009
|
2
|
-0.002
|
2
|
2
|
Immunophenotyping
|
Immunology
|
dn nkt
|
-0.001
|
6
|
0.001
|
6
|
0.006
|
6
|
6
|
Immunophenotyping
|
Immunology
|
dn t
|
0.005
|
7
|
0.000
|
7
|
0.000
|
7
|
7
|
Immunophenotyping
|
Immunology
|
eosinophils
|
0.000
|
3
|
0.013
|
3
|
0.005
|
3
|
3
|
Hematology
|
Hematology
|
follicular b cells
|
-0.002
|
2
|
-0.007
|
2
|
0.000
|
2
|
2
|
Immunophenotyping
|
Immunology
|
luc
|
0.000
|
2
|
0.021
|
2
|
0.027
|
2
|
2
|
Hematology
|
Hematology
|
lymphocytes
|
0.059
|
2
|
0.008
|
2
|
0.013
|
2
|
2
|
Hematology
|
Hematology
|
monocytes
|
0.002
|
3
|
0.006
|
3
|
0.009
|
3
|
3
|
Hematology
|
Hematology
|
neutrophils
|
-0.010
|
3
|
0.030
|
3
|
0.018
|
3
|
3
|
Hematology
|
Hematology
|
nk cells
|
0.000
|
6
|
0.002
|
6
|
0.002
|
6
|
6
|
Immunophenotyping
|
Immunology
|
nkt cells
|
0.000
|
4
|
-0.004
|
4
|
-0.001
|
4
|
4
|
Immunophenotyping
|
Immunology
|
percentage of live gated events
|
-0.007
|
2
|
-0.004
|
2
|
-0.001
|
2
|
2
|
Immunophenotyping
|
Immunology
|
response amplitude
|
0.003
|
10
|
0.004
|
10
|
0.013
|
10
|
10
|
Acoustic Startle and Pre-pulse Inhibition (PPI)
|
Behaviour
|
t cells
|
0.001
|
3
|
0.011
|
3
|
0.002
|
3
|
3
|
Immunophenotyping
|
Immunology
|
number events
|
0.001
|
2
|
0.000
|
2
|
-0.001
|
2
|
2
|
Immunophenotyping
|
Immunology
|
12khz-evoked abr threshold
|
-2.660
|
14
|
-2.144
|
14
|
-3.788
|
14
|
1
|
Auditory Brain Stem Response
|
Hearing
|
18khz-evoked abr threshold
|
-2.711
|
14
|
-2.193
|
14
|
-3.514
|
14
|
1
|
Auditory Brain Stem Response
|
Hearing
|
24khz-evoked abr threshold
|
-2.467
|
14
|
-1.182
|
14
|
-3.555
|
14
|
1
|
Auditory Brain Stem Response
|
Hearing
|
30khz-evoked abr threshold
|
-2.419
|
14
|
-2.456
|
14
|
-3.401
|
14
|
1
|
Auditory Brain Stem Response
|
Hearing
|
6khz-evoked abr threshold
|
-6.000
|
14
|
-4.570
|
14
|
-4.675
|
14
|
1
|
Auditory Brain Stem Response
|
Hearing
|
alanine aminotransferase
|
-1.677
|
16
|
-1.116
|
16
|
-2.143
|
16
|
1
|
Clinical Chemistry
|
Physiology
|
albumin
|
-2.221
|
16
|
-2.302
|
16
|
-3.575
|
16
|
1
|
Clinical Chemistry
|
Physiology
|
alkaline phosphatase
|
-2.480
|
16
|
-2.125
|
16
|
-2.553
|
16
|
1
|
Clinical Chemistry
|
Physiology
|
alpha-amylase
|
-2.316
|
9
|
-1.846
|
9
|
-3.002
|
9
|
1
|
Clinical Chemistry
|
Physiology
|
area under glucose response curve
|
-2.146
|
16
|
-2.088
|
16
|
-2.192
|
16
|
1
|
Intraperitoneal glucose tolerance test (IPGTT)
|
Metabolism
|
aspartate aminotransferase
|
-1.487
|
16
|
-1.111
|
16
|
-2.123
|
16
|
1
|
Clinical Chemistry
|
Physiology
|
basophil cell count
|
-2.440
|
8
|
-1.278
|
8
|
-1.527
|
8
|
1
|
Hematology
|
Hematology
|
basophil differential count
|
-2.659
|
8
|
-1.253
|
8
|
-2.318
|
8
|
1
|
Hematology
|
Hematology
|
bmc/body weight
|
-1.871
|
17
|
-2.057
|
17
|
-2.580
|
17
|
1
|
Body Composition (DEXA lean/fat)
|
Morphology
|
body length
|
-2.749
|
16
|
-2.780
|
16
|
-4.854
|
16
|
1
|
Body Composition (DEXA lean/fat)
|
Morphology
|
body temp
|
-6.000
|
3
|
-5.000
|
3
|
-6.576
|
3
|
1
|
Echo
|
Heart
|
body weight
|
-2.210
|
18
|
-2.251
|
18
|
-3.638
|
18
|
1
|
Body Weight
|
Morphology
|
body weight after experiment
|
-2.837
|
9
|
-2.949
|
9
|
-3.828
|
9
|
1
|
Indirect Calorimetry
|
Metabolism
|
body weight before experiment
|
-2.597
|
9
|
-2.688
|
9
|
-3.677
|
9
|
1
|
Indirect Calorimetry
|
Metabolism
|
bone area
|
-2.037
|
17
|
-1.964
|
17
|
-3.014
|
17
|
1
|
Body Composition (DEXA lean/fat)
|
Morphology
|
bone mineral content (excluding skull)
|
-1.799
|
17
|
-1.777
|
17
|
-2.565
|
17
|
1
|
Body Composition (DEXA lean/fat)
|
Morphology
|
bone mineral density (excluding skull)
|
-1.324
|
17
|
-1.230
|
17
|
-3.506
|
17
|
1
|
Body Composition (DEXA lean/fat)
|
Morphology
|
calcium
|
-2.447
|
16
|
-2.448
|
16
|
-5.041
|
16
|
1
|
Clinical Chemistry
|
Physiology
|
cardiac output
|
-2.671
|
5
|
-2.847
|
5
|
-3.575
|
5
|
1
|
Echo
|
Heart
|
center average speed
|
-2.564
|
12
|
-2.981
|
12
|
-2.753
|
12
|
1
|
Open Field
|
Behaviour
|
center distance travelled
|
-2.777
|
12
|
-1.859
|
12
|
-1.859
|
12
|
1
|
Open Field
|
Behaviour
|
center permanence time
|
-2.852
|
13
|
-2.078
|
13
|
-1.972
|
13
|
1
|
Open Field
|
Behaviour
|
center resting time
|
-2.418
|
10
|
-1.752
|
10
|
-1.576
|
10
|
1
|
Open Field
|
Behaviour
|
chloride
|
-1.617
|
10
|
-1.565
|
10
|
-5.111
|
10
|
1
|
Clinical Chemistry
|
Physiology
|
click-evoked abr threshold
|
-2.317
|
11
|
-1.793
|
11
|
-2.889
|
11
|
1
|
Auditory Brain Stem Response
|
Hearing
|
creatine kinase
|
-2.138
|
9
|
-1.168
|
9
|
-1.340
|
9
|
1
|
Clinical Chemistry
|
Physiology
|
creatinine
|
-2.358
|
16
|
-0.614
|
16
|
-2.654
|
16
|
1
|
Clinical Chemistry
|
Physiology
|
cv
|
-2.160
|
9
|
-1.615
|
9
|
-2.083
|
9
|
1
|
Electrocardiogram (ECG)
|
Heart
|
distance travelled - total
|
-2.312
|
13
|
-2.212
|
13
|
-2.242
|
13
|
1
|
Open Field
|
Behaviour
|
ejection fraction
|
-2.477
|
6
|
-2.588
|
6
|
-4.039
|
6
|
1
|
Echo
|
Heart
|
end-diastolic diameter
|
-6.000
|
3
|
-3.219
|
3
|
-4.076
|
3
|
1
|
Echo
|
Heart
|
end-systolic diameter
|
-6.000
|
3
|
-5.000
|
3
|
-3.875
|
3
|
1
|
Echo
|
Heart
|
fasted blood glucose concentration
|
-1.978
|
16
|
-2.041
|
16
|
-2.915
|
16
|
1
|
Intraperitoneal glucose tolerance test (IPGTT)
|
Metabolism
|
fat mass
|
-2.007
|
17
|
-1.755
|
17
|
-2.267
|
17
|
1
|
Body Composition (DEXA lean/fat)
|
Morphology
|
fat/body weight
|
-1.918
|
17
|
-1.806
|
17
|
-2.283
|
17
|
1
|
Body Composition (DEXA lean/fat)
|
Morphology
|
forelimb and hindlimb grip strength measurement mean
|
-2.365
|
16
|
-2.197
|
16
|
-3.135
|
16
|
1
|
Grip Strength
|
Morphology
|
forelimb grip strength measurement mean
|
-2.601
|
16
|
-2.573
|
16
|
-3.234
|
16
|
1
|
Grip Strength
|
Morphology
|
fractional shortening
|
-2.490
|
7
|
-2.520
|
7
|
-4.428
|
7
|
1
|
Echo
|
Heart
|
free fatty acids
|
-2.245
|
5
|
-2.204
|
5
|
-4.054
|
5
|
1
|
Clinical Chemistry
|
Physiology
|
fructosamine
|
-2.828
|
6
|
-2.795
|
6
|
-3.336
|
6
|
1
|
Clinical Chemistry
|
Physiology
|
glucose
|
-2.546
|
16
|
-1.963
|
16
|
-2.641
|
16
|
1
|
Clinical Chemistry
|
Physiology
|
hdl-cholesterol
|
-2.294
|
15
|
-2.035
|
15
|
-2.612
|
15
|
1
|
Clinical Chemistry
|
Physiology
|
heart weight
|
-1.978
|
15
|
-1.661
|
15
|
-3.140
|
15
|
1
|
Heart Weight
|
Morphology
|
heart weight normalised against body weight
|
-2.199
|
14
|
-1.782
|
14
|
-3.132
|
14
|
1
|
Heart Weight
|
Morphology
|
hematocrit
|
-1.578
|
17
|
-1.597
|
17
|
-3.881
|
17
|
1
|
Hematology
|
Hematology
|
hemoglobin
|
-2.449
|
17
|
-2.389
|
17
|
-3.875
|
17
|
1
|
Hematology
|
Hematology
|
hr
|
-2.090
|
12
|
-1.834
|
12
|
-2.476
|
12
|
1
|
Electrocardiogram (ECG)
|
Heart
|
hrv
|
-3.097
|
7
|
-1.989
|
7
|
-2.003
|
7
|
1
|
Electrocardiogram (ECG)
|
Heart
|
initial response to glucose challenge
|
-2.842
|
16
|
-3.311
|
16
|
-2.845
|
16
|
1
|
Intraperitoneal glucose tolerance test (IPGTT)
|
Metabolism
|
insulin
|
-1.138
|
8
|
-0.657
|
8
|
-1.041
|
8
|
1
|
Insulin Blood Level
|
Metabolism
|
iron
|
-1.934
|
11
|
-1.739
|
11
|
-2.948
|
11
|
1
|
Clinical Chemistry
|
Physiology
|
lactate dehydrogenase
|
-2.606
|
4
|
-1.765
|
4
|
-1.989
|
4
|
1
|
Clinical Chemistry
|
Physiology
|
latency to center entry
|
-2.294
|
10
|
-1.555
|
10
|
-1.435
|
10
|
1
|
Open Field
|
Behaviour
|
ldl-cholesterol
|
-1.447
|
7
|
-1.147
|
7
|
-0.946
|
7
|
1
|
Clinical Chemistry
|
Physiology
|
lean mass
|
-2.219
|
17
|
-2.145
|
17
|
-3.418
|
17
|
1
|
Body Composition (DEXA lean/fat)
|
Morphology
|
lean/body weight
|
-1.719
|
17
|
-1.798
|
17
|
-3.767
|
17
|
1
|
Body Composition (DEXA lean/fat)
|
Morphology
|
left anterior chamber depth
|
-1.863
|
2
|
-1.852
|
2
|
-7.000
|
2
|
1
|
Eye Morphology
|
Eye
|
left corneal thickness
|
-6.000
|
2
|
-5.000
|
2
|
-7.000
|
2
|
1
|
Eye Morphology
|
Eye
|
left inner nuclear layer
|
-6.000
|
2
|
-5.000
|
2
|
-7.000
|
2
|
1
|
Eye Morphology
|
Eye
|
left outer nuclear layer
|
-6.000
|
2
|
-5.000
|
2
|
-7.000
|
2
|
1
|
Eye Morphology
|
Eye
|
left posterior chamber depth
|
-6.000
|
2
|
-5.000
|
2
|
-4.923
|
2
|
1
|
Eye Morphology
|
Eye
|
left total retinal thickness
|
-1.607
|
3
|
-1.641
|
3
|
-5.300
|
3
|
1
|
Eye Morphology
|
Eye
|
locomotor activity
|
-2.301
|
13
|
-2.882
|
13
|
-2.361
|
13
|
1
|
Combined SHIRPA and Dysmorphology
|
Behaviour
|
lvawd
|
-6.000
|
5
|
-5.000
|
5
|
-4.648
|
5
|
1
|
Echo
|
Heart
|
lvaws
|
-1.627
|
4
|
-1.885
|
4
|
-3.427
|
4
|
1
|
Echo
|
Heart
|
lvidd
|
-2.763
|
7
|
-2.609
|
7
|
-4.135
|
7
|
1
|
Echo
|
Heart
|
lvids
|
-2.137
|
7
|
-2.075
|
7
|
-4.024
|
7
|
1
|
Echo
|
Heart
|
lvpwd
|
-2.578
|
7
|
-2.307
|
7
|
-4.028
|
7
|
1
|
Echo
|
Heart
|
lvpws
|
-2.718
|
6
|
-2.563
|
6
|
-3.982
|
6
|
1
|
Echo
|
Heart
|
magnesium
|
-6.000
|
6
|
-3.327
|
6
|
-2.767
|
6
|
1
|
Urinalysis
|
Physiology
|
mean cell hemoglobin concentration
|
-1.404
|
17
|
-1.334
|
17
|
-5.254
|
17
|
1
|
Hematology
|
Hematology
|
mean cell volume
|
-1.702
|
17
|
-1.737
|
17
|
-5.137
|
17
|
1
|
Hematology
|
Hematology
|
mean corpuscular hemoglobin
|
-2.334
|
17
|
-2.325
|
17
|
-5.730
|
17
|
1
|
Hematology
|
Hematology
|
mean platelet volume
|
-2.727
|
13
|
-2.650
|
13
|
-4.354
|
13
|
1
|
Hematology
|
Hematology
|
mean r amplitude
|
-6.000
|
8
|
-2.751
|
8
|
-2.519
|
8
|
1
|
Electrocardiogram (ECG)
|
Heart
|
mean sr amplitude
|
-4.105
|
7
|
-3.587
|
7
|
-3.330
|
7
|
1
|
Electrocardiogram (ECG)
|
Heart
|
mzb (cd21/35 high)
|
-2.182
|
4
|
-1.822
|
4
|
-7.000
|
4
|
1
|
Immunophenotyping
|
Immunology
|
number of caudal vertebrae
|
-1.333
|
7
|
-1.331
|
7
|
-16.871
|
11
|
1
|
X-ray
|
Morphology
|
number of center entries
|
-2.587
|
10
|
-2.550
|
10
|
-1.942
|
10
|
1
|
Open Field
|
Behaviour
|
number of digits
|
-1.530
|
3
|
-1.530
|
3
|
-16.871
|
15
|
1
|
X-ray
|
Morphology
|
number of lumbar vertebrae
|
-0.951
|
3
|
-0.951
|
3
|
-16.871
|
14
|
1
|
X-ray
|
Morphology
|
number of pelvic vertebrae
|
-1.655
|
3
|
-1.655
|
3
|
-16.871
|
14
|
1
|
X-ray
|
Morphology
|
number of rears - total
|
-2.017
|
8
|
-1.274
|
8
|
-1.892
|
8
|
1
|
Open Field
|
Behaviour
|
number of ribs left
|
-1.234
|
3
|
-1.233
|
3
|
-16.871
|
15
|
1
|
X-ray
|
Morphology
|
number of ribs right
|
-2.400
|
2
|
-2.402
|
2
|
-16.871
|
15
|
1
|
X-ray
|
Morphology
|
number of signals
|
-3.327
|
9
|
-3.870
|
9
|
-3.407
|
11
|
1
|
Electrocardiogram (ECG)
|
Heart
|
others
|
-3.208
|
6
|
-2.931
|
6
|
-5.111
|
6
|
1
|
Immunophenotyping
|
Immunology
|
pdcs
|
-1.637
|
5
|
-0.679
|
5
|
-1.979
|
5
|
1
|
Immunophenotyping
|
Immunology
|
percentage center time
|
-2.726
|
13
|
-2.123
|
13
|
-1.931
|
13
|
1
|
Open Field
|
Behaviour
|
periphery average speed
|
-2.423
|
12
|
-2.283
|
12
|
-2.614
|
12
|
1
|
Open Field
|
Behaviour
|
periphery distance travelled
|
-2.477
|
12
|
-2.624
|
12
|
-2.273
|
12
|
1
|
Open Field
|
Behaviour
|
periphery permanence time
|
-1.889
|
13
|
-2.136
|
13
|
-3.343
|
13
|
1
|
Open Field
|
Behaviour
|
periphery resting time
|
-2.418
|
10
|
-2.895
|
10
|
-2.544
|
10
|
1
|
Open Field
|
Behaviour
|
phosphorus
|
-3.180
|
16
|
-2.391
|
16
|
-2.927
|
16
|
1
|
Clinical Chemistry
|
Physiology
|
platelet count
|
-2.517
|
17
|
-2.448
|
17
|
-3.239
|
17
|
1
|
Hematology
|
Hematology
|
pnn5(6>ms)
|
-6.000
|
6
|
-1.355
|
6
|
-1.160
|
6
|
1
|
Electrocardiogram (ECG)
|
Heart
|
potassium
|
-1.788
|
10
|
-1.685
|
10
|
-3.393
|
10
|
1
|
Clinical Chemistry
|
Physiology
|
pq
|
-2.365
|
7
|
-2.799
|
7
|
-3.489
|
7
|
1
|
Electrocardiogram (ECG)
|
Heart
|
pr
|
-2.816
|
11
|
-2.779
|
11
|
-3.976
|
11
|
1
|
Electrocardiogram (ECG)
|
Heart
|
qrs
|
-3.265
|
11
|
-3.212
|
11
|
-4.590
|
11
|
1
|
Electrocardiogram (ECG)
|
Heart
|
qtc
|
-3.176
|
10
|
-2.941
|
10
|
-4.831
|
10
|
1
|
Electrocardiogram (ECG)
|
Heart
|
qtc dispersion
|
-2.997
|
7
|
-2.265
|
7
|
-3.126
|
7
|
1
|
Electrocardiogram (ECG)
|
Heart
|
red blood cell count
|
-2.269
|
17
|
-2.315
|
17
|
-3.795
|
17
|
1
|
Hematology
|
Hematology
|
red blood cell distribution width
|
-1.512
|
13
|
-1.425
|
13
|
-3.810
|
13
|
1
|
Hematology
|
Hematology
|
respiration rate
|
-2.972
|
4
|
-2.405
|
4
|
-3.468
|
4
|
1
|
Echo
|
Heart
|
respiratory exchange ratio
|
-2.339
|
9
|
-2.359
|
9
|
-4.825
|
9
|
1
|
Indirect Calorimetry
|
Metabolism
|
right anterior chamber depth
|
-0.465
|
2
|
-0.469
|
2
|
-7.000
|
2
|
1
|
Eye Morphology
|
Eye
|
right corneal thickness
|
-2.191
|
2
|
-2.409
|
2
|
-4.423
|
2
|
1
|
Eye Morphology
|
Eye
|
right inner nuclear layer
|
-1.035
|
2
|
-0.935
|
2
|
-3.449
|
2
|
1
|
Eye Morphology
|
Eye
|
right outer nuclear layer
|
-6.000
|
2
|
-5.000
|
2
|
-7.000
|
2
|
1
|
Eye Morphology
|
Eye
|
right posterior chamber depth
|
-6.000
|
2
|
-5.000
|
2
|
-4.092
|
2
|
1
|
Eye Morphology
|
Eye
|
right total retinal thickness
|
-0.948
|
3
|
-0.974
|
3
|
-4.789
|
3
|
1
|
Eye Morphology
|
Eye
|
rmssd
|
-1.249
|
7
|
-0.802
|
7
|
-1.936
|
7
|
1
|
Electrocardiogram (ECG)
|
Heart
|
rp macrophage (cd19- cd11c-)
|
-1.316
|
6
|
-1.285
|
6
|
-2.224
|
6
|
1
|
Immunophenotyping
|
Immunology
|
rr
|
-2.033
|
11
|
-1.988
|
11
|
-4.619
|
11
|
1
|
Electrocardiogram (ECG)
|
Heart
|
sodium
|
-1.627
|
10
|
-1.544
|
10
|
-5.603
|
10
|
1
|
Clinical Chemistry
|
Physiology
|
spleen weight
|
-1.306
|
10
|
-1.020
|
10
|
-2.743
|
10
|
1
|
Immunophenotyping
|
Immunology
|
st
|
-2.830
|
11
|
-2.548
|
11
|
-4.127
|
11
|
1
|
Electrocardiogram (ECG)
|
Heart
|
stroke volume
|
-2.179
|
5
|
-2.091
|
5
|
-4.875
|
5
|
1
|
Echo
|
Heart
|
tibia length
|
-0.830
|
12
|
-0.841
|
12
|
-5.345
|
12
|
1
|
Heart Weight
|
Morphology
|
total bilirubin
|
-2.143
|
16
|
-1.809
|
16
|
-2.661
|
16
|
1
|
Clinical Chemistry
|
Physiology
|
total cholesterol
|
-1.302
|
16
|
-1.110
|
16
|
-2.930
|
16
|
1
|
Clinical Chemistry
|
Physiology
|
total food intake
|
-1.938
|
6
|
-1.755
|
6
|
-3.002
|
6
|
1
|
Indirect Calorimetry
|
Metabolism
|
total protein
|
-6.000
|
16
|
-3.618
|
16
|
-4.016
|
16
|
1
|
Clinical Chemistry
|
Physiology
|
total water intake
|
-2.843
|
3
|
-5.000
|
3
|
-2.782
|
3
|
1
|
Indirect Calorimetry
|
Metabolism
|
triglycerides
|
-2.116
|
16
|
-1.701
|
16
|
-1.947
|
16
|
1
|
Clinical Chemistry
|
Physiology
|
urea (blood urea nitrogen - bun)
|
-1.658
|
16
|
-1.442
|
16
|
-2.669
|
16
|
1
|
Clinical Chemistry
|
Physiology
|
uric acid
|
-6.000
|
3
|
-1.838
|
3
|
-1.085
|
3
|
1
|
Clinical Chemistry
|
Physiology
|
white blood cell count
|
-2.181
|
16
|
-1.698
|
16
|
-2.411
|
16
|
1
|
Hematology
|
Hematology
|
whole arena average speed
|
-2.253
|
13
|
-2.232
|
13
|
-2.518
|
13
|
1
|
Open Field
|
Behaviour
|
whole arena permanence
|
-1.055
|
2
|
-1.056
|
2
|
-16.871
|
13
|
1
|
Open Field
|
Behaviour
|
whole arena resting time
|
-2.730
|
13
|
-2.866
|
13
|
-2.432
|
13
|
1
|
Open Field
|
Behaviour
|
#### Meta-analysis of heterogeneity
## Perform meta-meta-analysis (3 for each of the 9 grouping terms: var.CVR, var.VR, var.RR)
metacombohetero_final <- metacombohetero %>%
group_by(GroupingTerm) %>%
nest()
# Final random effects meta-analyses within grouping terms, with SE of the estimate
heterog1 <- metacombohetero_final %>%
mutate(
model_heteroCVR = map(data, ~ metafor::rma.uni(
yi = .x$var.CVR, sei = sqrt(1 / 2 * (.x$N.CVR - 1)),
control = list(optimizer = "optim",
optmethod = "Nelder-Mead",
maxit = 10000,
stepadj = 0.5), verbose = F)),
model_heteroVR = map(data, ~ metafor::rma.uni(
yi = .x$var.VR, sei = sqrt(1 / 2 * (.x$N.VR - 1)),
control = list(optimizer = "optim",
optmethod = "Nelder-Mead",
maxit = 10000,
stepadj = 0.5), verbose = F)),
model_heteroRR = map(data, ~ metafor::rma.uni(
yi = .x$var.RR, sei = sqrt(1 / 2 * (.x$N.RR - 1)),
control = list(optimizer = "optim",
optmethod = "Nelder-Mead",
maxit = 10000,
stepadj = 0.5), verbose = F)) )
# Across all grouping terms
metacombohetero_all_final <- metacombohetero %>%
nest(data = everything())
# Final random effects meta-analyses ACROSS grouping terms, with SE of the estimate
heterog1_all <- metacombohetero_all_final %>%
mutate( model_heteroCVR = map(data, ~ metafor::rma.uni(
yi = .x$var.CVR, sei = sqrt(1 / 2 * (.x$N.CVR - 1)),
control = list(optimizer = "optim",
optmethod = "Nelder-Mead",
maxit = 10000,
stepadj = 0.5), verbose = F)),
model_heteroVR = map(data, ~ metafor::rma.uni(yi = .x$var.VR, sei = sqrt(1 / 2 * (.x$N.VR - 1)),
control = list(optimizer = "optim",
optmethod = "Nelder-Mead",
maxit = 10000,
stepadj = 0.5), verbose = F)),
model_heteroRR = map(data, ~ metafor::rma.uni(yi = .x$var.RR, sei = sqrt(1 / 2 * (.x$N.RR - 1)),
control = list(optimizer = "optim",
optmethod = "Nelder-Mead",
maxit = 10000,
stepadj = 0.5), verbose = F)))
# Re-structure data for each grouping term; extract heterogenenity/variance terms; delete un-used variables
extract_heterogeneity <- function(data, type){
tmp <- data %>%
filter(., GroupingTerm == type) %>%
select(., -data) %>%
mutate(heteroCVR = .[[2]][[1]]$b,
heteroCVR_lower = .[[2]][[1]]$ci.lb,
heteroCVR_upper = .[[2]][[1]]$ci.ub,
heteroCVR_se = .[[2]][[1]]$se,
heteroVR = .[[3]][[1]]$b,
heteroVR_lower = .[[3]][[1]]$ci.lb,
heteroVR_upper = .[[3]][[1]]$ci.ub,
heteroVR_se = .[[3]][[1]]$se,
heteroRR = .[[4]][[1]]$b,
heteroRR_lower = .[[4]][[1]]$ci.lb,
heteroRR_upper = .[[4]][[1]]$ci.ub,
heteroRR_se = .[[4]][[1]]$se) %>%
select(., GroupingTerm, heteroCVR:heteroRR_se)
return(tmp)
}
Behaviour. <- extract_heterogeneity(heterog1, type = "Behaviour")
Immunology. <- extract_heterogeneity(heterog1, type = "Immunology")
Hematology. <- extract_heterogeneity(heterog1, type = "Hematology")
Hearing. <- extract_heterogeneity(heterog1, type = "Hearing")
Physiology. <- extract_heterogeneity(heterog1, type = "Physiology")
Metabolism. <- extract_heterogeneity(heterog1, type = "Metabolism")
Morphology. <- extract_heterogeneity(heterog1, type = "Morphology")
Heart. <- extract_heterogeneity(heterog1, type = "Heart")
Eye. <- extract_heterogeneity(heterog1, type = "Eye")
#Reorder to be able to keep cell referencing
heterog1_all <- heterog1_all %>%
mutate(GroupingTerm = "All") %>%
select(GroupingTerm, everything())
All. <- heterog1_all %>%
select(., -data) %>%
mutate(heteroCVR = .[[2]][[1]]$b,
heteroCVR_lower = .[[2]][[1]]$ci.lb,
heteroCVR_upper = .[[2]][[1]]$ci.ub,
heteroCVR_se = .[[2]][[1]]$se,
heteroVR = .[[3]][[1]]$b,
heteroVR_lower = .[[3]][[1]]$ci.lb,
heteroVR_upper = .[[3]][[1]]$ci.ub,
heteroVR_se = .[[3]][[1]]$se,
heteroRR = .[[4]][[1]]$b,
heteroRR_lower = .[[4]][[1]]$ci.lb,
heteroRR_upper = .[[4]][[1]]$ci.ub,
heteroRR_se = .[[4]][[1]]$se) %>%
select(., GroupingTerm, heteroCVR:heteroRR_se)
heterog2 <- bind_rows(Behaviour., Morphology., Metabolism., Physiology., Immunology., Hematology., Heart., Hearing., Eye., All.)
#### Preparation of the Heterogeneity PLOT
#Restructure data for plotting
heterog3 <- gather(heterog2, parameter, value, c(heteroCVR, heteroVR, heteroRR), factor_key = TRUE)
heteroCVR.ci <- heterog3 %>%
filter(parameter == "heteroCVR") %>%
mutate(ci.low = heteroCVR_lower,
ci.high = heteroCVR_upper)
heteroVR.ci <- heterog3 %>%
filter(parameter == "heteroVR") %>%
mutate(ci.low = heteroVR_lower,
ci.high = heteroVR_upper)
heteroRR.ci <- heterog3 %>%
filter(parameter == "heteroRR") %>%
mutate(ci.low = heteroRR_lower,
ci.high = heteroRR_upper)
heterog4 <- bind_rows(heteroCVR.ci, heteroVR.ci, heteroRR.ci) %>% select(GroupingTerm, parameter, value, ci.low, ci.high)
# **Re-order grouping terms
heterog4$GroupingTerm <- factor(heterog4$GroupingTerm,
levels = c("Behaviour", "Morphology", "Metabolism",
"Physiology", "Immunology", "Hematology", "Heart",
"Hearing", "Eye", "All"))
heterog4$GroupingTerm <- factor(heterog4$GroupingTerm,
rev(levels(heterog4$GroupingTerm)))
heterog4$label <- "All traits"
# write.csv(heterog4, "heterog4.csv")
#### Plot S1 C (Second-order meta analysis on heterogeneity)
heterog5 <- heterog4
heterog5$mean <- as.numeric(exp(heterog5$value))
heterog5$ci.l <- as.numeric(exp(heterog5$ci.low))
heterog5$ci.h <- as.numeric(exp(heterog5$ci.high))
heterog6 <- heterog5
HeteroS1 <-
heterog6 %>%
ggplot(aes(y = GroupingTerm, x = mean)) +
geom_errorbarh(aes(
xmin = ci.l,
xmax = ci.h
),
height = 0.1, show.legend = FALSE
) +
geom_point(aes(shape = parameter),
fill = "black",
color = "black", size = 2.2,
show.legend = FALSE
) +
scale_x_continuous(
limits = c(-0.1, 1.4),
# breaks = c(0, 0.1, 0.2),
name = "sigma^2"
) +
# geom_vline(xintercept=0,
# color='black',
# linetype='dashed')+
facet_grid(
cols = vars(parameter), rows = vars(label),
labeller = label_wrap_gen(width = 23),
scales = "free",
space = "free"
) +
theme_bw() +
theme(
strip.text.y = element_text(angle = 270, size = 10, margin = margin(t = 15, r = 15, b = 15, l = 15)),
strip.text.x = element_text(size = 12),
strip.background = element_rect(colour = NULL, linetype = "blank", fill = "gray90"),
text = element_text(size = 14),
panel.spacing = unit(0.5, "lines"),
panel.border = element_blank(),
axis.line = element_line(),
panel.grid.major.x = element_line(linetype = "solid", colour = "gray95"),
panel.grid.major.y = element_line(linetype = "solid", color = "gray95"),
panel.grid.minor.y = element_blank(),
panel.grid.minor.x = element_blank(),
legend.title = element_blank(),
axis.title.x = element_text(hjust = 0.5, size = 14),
axis.title.y = element_blank())