pacman::p_load(tidyverse, kableExtra, DataExplorer, viridis, cowplot, maps, rotl,
ape, metafor, patchwork, orchaRd, car, MuMIn, GGally)d.raw: raw data set
d.raw <- read_csv("data/Raw_data.csv")The sampling variance of ARRD (effect size) was calculated based on the adjusted sample size (the sample size was divided by two when experimental groups were involved in multiple comparisons)
ARR_f: Acclimation response ratio of femalesARR_m: Acclimation response ratio of malesARRD: Difference in acclimation response ratios between females and males (i.e. effect size in this study)Var_ARRD: Sampling variance of ARRD; calculated with adjusted sample sizes (i.e. sample size divided by half when experimental groups were involved in multiple comparisons)precision: Inverse of the squared sampling variance of ARRDabs_latituded.raw <- d.raw %>%
mutate(abs_latitude = abs(latitude)) %>%
mutate(abs_longitude = abs(longitude)) %>%
mutate(ARR_f = ((mean_high_f - mean_low_f)/(acc_temp_high - acc_temp_low))) %>%
mutate(ARR_m = ((mean_high_m - mean_low_m)/(acc_temp_high - acc_temp_low))) %>%
mutate(ARRD = ARR_f - ARR_m) %>%
mutate(Var_ARRD = ((1/(acc_temp_high - acc_temp_low))^2 * (sd_low_f^2/n_low_f_adj +
sd_high_f^2/n_high_f_adj + sd_low_m^2/n_low_m_adj + sd_high_m^2/n_high_m_adj))) %>%
mutate(precision = (1/sqrt(Var_ARRD)))The categorical variables were converted to factors
d.raw$es_ID = as.factor(d.raw$es_ID)
d.raw$species_ID = as.factor(d.raw$species_ID)
d.raw$study_ID = as.factor(d.raw$study_ID)
d.raw$shared_trt_ID = as.factor(d.raw$shared_trt_ID)
d.raw$shared_measurement_ID = as.factor(d.raw$shared_measurement_ID)
d.raw$data_type = as.factor(d.raw$data_type)
d.raw$peer_reviewed = as.factor(d.raw$peer_reviewed)
d.raw$ref = as.factor(d.raw$ref)
d.raw$class = as.factor(d.raw$class)
d.raw$order = as.factor(d.raw$order)
d.raw$genus_species = as.factor(d.raw$genus_species)
d.raw$habitat = as.factor(d.raw$habitat)
d.raw$taxonomic_group = as.factor(d.raw$taxonomic_group)
d.raw$taxonomic_group_sub = as.factor(d.raw$taxonomic_group_sub)
d.raw$origin = as.factor(d.raw$origin)
d.raw$outcome = as.factor(d.raw$outcome)We can see that the sample size for PBT data is small (n=14). It is probably best not to run the analyses of the interaction between our predictor variables and the outcome (PBT, UTL or LTL) because it could result in type I and type II errors due to low sample size.
We also have a better coverage for the body mass dimorphism index MDI compared to the size dimorphism index SDI. Hence, we would use the former variable to investigate the influence of sexual size dimorphism on sex differences in acclimation capacity.
The minimum and maximum values of ARRD, ARR_f and ARR_m are quite extreme. However, these values seem plausible and may not need to be removed just based on their values.
kable(summary(d.raw), "html") %>%
kable_styling("striped", position = "left") %>%
scroll_box(width = "100%", height = "500px")| es_ID | species_ID | study_ID | shared_trt_ID | shared_measurement_ID | fig_ID | fig_file_name | data_type | peer_reviewed | data_file_name | ref | title | pub_year | authors | journal | doi | language | phylum | class | order | family | genus | species | genus_species | variety | habitat | taxonomic_group | taxonomic_group_sub | life_stage | origin | n_generations_lab | population | latitude | longitude | elevation | season | year | body_length_f.cm | body_length_m.cm | diff_body_length | SDI | source_body_length | body_mass_f.g | body_mass_m.g | diff_body_mass | MDI | source_body_mass | age | incubation_temp | outcome | method | endpoint | acc_temp_low | acc_temp_high | acc_duration | ramping.deg.min | measurement_rate.h | exp_duration.h | n_observations | gradient_type | gradient_range | humidity.percent | oxygen.mg.L | salinity.ppt | pH | photoperiod.light | gravidity | major_concern | minor_concern | notes_moderators | mean_low_f | sd_low_f | n_low_f | n_low_f_adj | mean_high_f | sd_high_f | n_high_f | n_high_f_adj | mean_low_m | sd_low_m | n_low_m | n_low_m_adj | mean_high_m | sd_high_m | n_high_m | n_high_m_adj | exp_group_discarded | notes_outcome | abs_latitude | abs_longitude | ARR_f | ARR_m | ARRD | Var_ARRD | precision | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| es1 : 1 | sp8 : 30 | st6 : 30 | t94 : 14 | m173 : 5 | Min. : 1.0 | Length:240 | published :109 | not peer-reviewed: 49 | Length:240 | Watson and McMahon 2008 : 30 | Length:240 | Min. :1994 | Length:240 | Length:240 | Length:240 | Length:240 | Length:240 | Insecta :76 | Cyprinodontiformes:54 | Length:240 | Length:240 | Length:240 | Gambusia affinis : 30 | Length:240 | aquatic :137 | invertebrate:129 | Aquatic Invertebrates :53 | Length:240 | lab : 71 | Min. : 1.000 | Length:240 | Min. :-46.90 | Min. :-155.0535 | Min. : 0.0 | Length:240 | Min. :1975 | Min. : 0.094 | Min. : 0.0800 | Min. :-1.00000 | Min. :-0.70714 | Length:240 | Min. : 0.0002 | Min. : 0.0002 | Min. :-14.38400 | Min. :-2.8694 | Length:240 | Min. : 7.00 | Min. :14.00 | LTL:103 | Length:240 | Length:240 | Min. : 2.30 | Min. : 7.2 | Min. : 1.00 | Min. :0.0001 | Min. : 0.4286 | Min. : 2.000 | Min. : 1.00 | Length:240 | Min. :20.09 | Min. : 43.00 | Min. :6.000 | Min. : 1.00 | Min. :7.100 | Min. :10.00 | Length:240 | Length:240 | Length:240 | Length:240 | Min. :-18.430 | Min. :0.1329 | Min. : 2.00 | Min. : 1.00 | Min. :-19.530 | Min. :0.06788 | Min. : 2 | Min. : 1.00 | Min. :-18.710 | Min. :0.1414 | Min. : 2.00 | Min. : 1.000 | Min. :-19.510 | Min. :0.1269 | Min. : 2.00 | Min. : 1.000 | Length:240 | Length:240 | Min. :10.43 | Min. : 0.7994 | Min. :-0.57119 | Min. :-0.50843 | Min. :-0.765818 | Min. :0.0001011 | Min. : 0.9275 | |
| es10 : 1 | sp1 : 20 | st1 : 20 | t119 : 6 | m172 : 4 | 1st Qu.: 4.0 | Class :character | unpublished:131 | peer-reviewed :191 | Class :character | Allen et al. 2012 : 20 | Class :character | 1st Qu.:2008 | Class :character | Class :character | Class :character | Class :character | Class :character | Actinopterygii:62 | Coleoptera :38 | Class :character | Class :character | Class :character | Tenebrio molitor : 20 | Class :character | terrestrial:103 | vertebrate :111 | Fishes :66 | Class :character | wild:165 | 1st Qu.: 1.000 | Class :character | 1st Qu.:-33.87 | 1st Qu.: -81.0000 | 1st Qu.: 0.0 | Class :character | 1st Qu.:2007 | 1st Qu.: 0.554 | 1st Qu.: 0.6248 | 1st Qu.: 0.00334 | 1st Qu.: 0.01348 | Class :character | 1st Qu.: 0.0643 | 1st Qu.: 0.0683 | 1st Qu.: -0.01274 | 1st Qu.:-0.1368 | Class :character | 1st Qu.:10.00 | 1st Qu.:25.00 | PBT: 14 | Class :character | Class :character | 1st Qu.:10.80 | 1st Qu.:20.0 | 1st Qu.: 6.00 | 1st Qu.:0.2000 | 1st Qu.: 1.3333 | 1st Qu.: 2.750 | 1st Qu.: 11.00 | Class :character | 1st Qu.:27.62 | 1st Qu.: 69.00 | 1st Qu.:6.000 | 1st Qu.:20.00 | 1st Qu.:7.100 | 1st Qu.:12.00 | Class :character | Class :character | Class :character | Class :character | 1st Qu.: 3.773 | 1st Qu.:0.4205 | 1st Qu.: 4.00 | 1st Qu.: 4.00 | 1st Qu.: 6.165 | 1st Qu.:0.37000 | 1st Qu.: 4 | 1st Qu.: 3.50 | 1st Qu.: 3.946 | 1st Qu.:0.4548 | 1st Qu.: 5.00 | 1st Qu.: 4.000 | 1st Qu.: 6.071 | 1st Qu.:0.4401 | 1st Qu.: 5.00 | 1st Qu.: 4.000 | Class :character | Class :character | 1st Qu.:30.49 | 1st Qu.: 18.6240 | 1st Qu.: 0.04937 | 1st Qu.: 0.04281 | 1st Qu.:-0.052371 | 1st Qu.:0.0017246 | 1st Qu.: 6.5039 | |
| es100 : 1 | sp21 : 18 | st5 : 20 | t118 : 5 | m123 : 2 | Median :14.0 | Mode :character | NA | NA | Mode :character | Lyons et al. 2012 : 20 | Mode :character | Median :2012 | Mode :character | Mode :character | Mode :character | Mode :character | Mode :character | Malacostraca :49 | Diptera :31 | Mode :character | Mode :character | Mode :character | Hyperolius marmoratus: 18 | Mode :character | NA | NA | Reptiles and Amphibians :45 | Mode :character | NA’s: 4 | Median : 4.000 | Mode :character | Median : 30.15 | Median : -0.7994 | Median : 7.0 | Mode :character | Median :2008 | Median : 3.742 | Median : 2.9081 | Median : 0.22600 | Median : 0.12337 | Mode :character | Median : 0.3018 | Median : 0.1554 | Median : 0.01090 | Median : 0.1300 | Mode :character | Median :15.00 | Median :25.00 | UTL:123 | Mode :character | Mode :character | Median :15.00 | Median :25.0 | Median : 14.00 | Median :0.3000 | Median : 6.0000 | Median : 7.625 | Median : 27.00 | Mode :character | Median :29.00 | Median : 80.00 | Median :6.750 | Median :20.00 | Median :7.150 | Median :12.00 | Mode :character | Mode :character | Mode :character | Mode :character | Median : 27.708 | Median :0.7262 | Median : 8.00 | Median : 6.00 | Median : 27.797 | Median :0.70242 | Median : 8 | Median : 6.00 | Median : 28.146 | Median :0.7128 | Median : 8.00 | Median : 5.000 | Median : 28.762 | Median :0.6873 | Median : 8.00 | Median : 5.000 | Mode :character | Mode :character | Median :33.91 | Median : 32.7831 | Median : 0.14848 | Median : 0.14778 | Median :-0.003267 | Median :0.0058757 | Median :13.0458 | |
| es101 : 1 | sp23 : 17 | st18 : 18 | t116 : 3 | m124 : 2 | Mean :12.4 | NA | NA | NA | NA | Davies et al. 2015 : 18 | NA | Mean :2011 | NA | NA | NA | NA | NA | Reptilia :23 | Amphipoda :23 | NA | NA | NA | Fundulus heteroclitus: 17 | NA | NA | NA | Terrestrial Invertebrates:76 | NA | NA | Mean : 5.955 | NA | Mean : 11.19 | Mean : -20.7520 | Mean : 146.6 | NA | Mean :2007 | Mean : 5.015 | Mean : 4.2045 | Mean : 0.83650 | Mean : 0.16469 | NA | Mean : 24.6402 | Mean : 19.9282 | Mean : 4.82695 | Mean : 0.1305 | NA | Mean :15.18 | Mean :24.38 | NA | NA | NA | Mean :15.26 | Mean :24.6 | Mean : 16.69 | Mean :0.4333 | Mean : 5.0068 | Mean :15.071 | Mean : 84.21 | NA | Mean :30.83 | Mean : 75.69 | Mean :6.709 | Mean :24.81 | Mean :7.221 | Mean :12.33 | NA | NA | NA | NA | Mean : 22.280 | Mean :0.9383 | Mean : 13.88 | Mean : 12.43 | Mean : 23.781 | Mean :0.92771 | Mean : 14 | Mean : 12.59 | Mean : 22.287 | Mean :0.9957 | Mean : 10.45 | Mean : 8.967 | Mean : 23.756 | Mean :0.9281 | Mean : 11.05 | Mean : 9.575 | NA | NA | Mean :35.35 | Mean : 48.6475 | Mean : 0.16955 | Mean : 0.16480 | Mean : 0.004756 | Mean :0.0481600 | Mean :20.3597 | |
| es102 : 1 | sp20 : 16 | st20 : 17 | t117 : 3 | m125 : 2 | 3rd Qu.:18.0 | NA | NA | NA | NA | Fangue et al. 2006 : 17 | NA | 3rd Qu.:2014 | NA | NA | NA | NA | NA | Amphibia :22 | Anura :20 | NA | NA | NA | Enochrus politus : 16 | NA | NA | NA | NA | NA | NA | 3rd Qu.:10.500 | NA | 3rd Qu.: 38.17 | 3rd Qu.: 18.7850 | 3rd Qu.: 187.0 | NA | 3rd Qu.:2011 | 3rd Qu.: 6.177 | 3rd Qu.: 5.9264 | 3rd Qu.: 1.01219 | 3rd Qu.: 0.33158 | NA | 3rd Qu.: 1.7000 | 3rd Qu.: 1.4000 | 3rd Qu.: 0.16425 | 3rd Qu.: 0.5451 | NA | 3rd Qu.:20.00 | 3rd Qu.:25.00 | NA | NA | NA | 3rd Qu.:20.00 | 3rd Qu.:30.0 | 3rd Qu.: 21.00 | 3rd Qu.:0.5000 | 3rd Qu.: 6.0000 | 3rd Qu.:24.000 | 3rd Qu.:144.00 | NA | 3rd Qu.:38.00 | 3rd Qu.: 80.00 | 3rd Qu.:6.750 | 3rd Qu.:32.00 | 3rd Qu.:7.150 | 3rd Qu.:12.00 | NA | NA | NA | NA | 3rd Qu.: 39.281 | 3rd Qu.:1.1248 | 3rd Qu.: 12.00 | 3rd Qu.: 8.00 | 3rd Qu.: 40.430 | 3rd Qu.:1.13383 | 3rd Qu.: 12 | 3rd Qu.: 8.00 | 3rd Qu.: 38.883 | 3rd Qu.:1.1676 | 3rd Qu.: 11.00 | 3rd Qu.: 9.000 | 3rd Qu.: 39.980 | 3rd Qu.:1.0768 | 3rd Qu.: 10.00 | 3rd Qu.: 8.000 | NA | NA | 3rd Qu.:43.03 | 3rd Qu.: 81.7522 | 3rd Qu.: 0.29331 | 3rd Qu.: 0.29161 | 3rd Qu.: 0.060442 | 3rd Qu.:0.0236410 | 3rd Qu.:24.0809 | |
| es103 : 1 | sp18 : 14 | st17 : 16 | t164 : 3 | m126 : 2 | Max. :25.0 | NA | NA | NA | NA | Botella-Cruz et al. 2016: 16 | NA | Max. :2020 | NA | NA | NA | NA | NA | Chondrichthyes: 4 | Squamata :19 | NA | NA | NA | Crangon crangon : 14 | NA | NA | NA | NA | NA | NA | Max. :20.000 | NA | Max. : 61.20 | Max. : 147.2667 | Max. :2975.7 | NA | Max. :2019 | Max. :26.877 | Max. :24.9357 | Max. : 7.75000 | Max. : 1.00000 | NA | Max. :907.2000 | Max. :724.9500 | Max. :283.61750 | Max. : 2.1083 | NA | Max. :30.00 | Max. :27.00 | NA | NA | NA | Max. :32.10 | Max. :35.1 | Max. :126.00 | Max. :1.0000 | Max. :12.0000 | Max. :48.000 | Max. :288.00 | NA | Max. :43.00 | Max. :100.00 | Max. :9.300 | Max. :60.00 | Max. :7.750 | Max. :24.00 | NA | NA | NA | NA | Max. : 53.853 | Max. :5.4300 | Max. :181.00 | Max. :181.00 | Max. : 54.417 | Max. :8.29597 | Max. :263 | Max. :263.00 | Max. : 54.333 | Max. :7.5728 | Max. :142.00 | Max. :142.000 | Max. : 54.333 | Max. :7.5728 | Max. :261.00 | Max. :261.000 | NA | NA | Max. :61.20 | Max. :155.0535 | Max. : 1.82289 | Max. : 1.30526 | Max. : 0.860000 | Max. :1.1623167 | Max. :99.4402 | |
| (Other):234 | (Other):125 | (Other):119 | (Other):206 | (Other):223 | NA’s :167 | NA | NA | NA | NA | (Other) :119 | NA | NA | NA | NA | NA | NA | NA | (Other) : 4 | (Other) :55 | NA | NA | NA | (Other) :125 | NA | NA | NA | NA | NA | NA | NA’s :218 | NA | NA’s :16 | NA’s :16 | NA’s :16 | NA | NA’s :62 | NA’s :77 | NA’s :77 | NA’s :82 | NA’s :82 | NA | NA’s :30 | NA’s :30 | NA’s :35 | NA’s :35 | NA | NA’s :218 | NA’s :184 | NA | NA | NA | NA | NA | NA’s :7 | NA’s :18 | NA’s :226 | NA’s :226 | NA’s :226 | NA | NA’s :226 | NA’s :167 | NA’s :229 | NA’s :173 | NA’s :228 | NA’s :49 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA’s :16 | NA’s :16 | NA | NA | NA | NA | NA |
Here, we checked the mean, minimum, and maximum values of ARRD, ARR_f and ARR_m for each study to see if the extreme values are particularly condensed in certain studies.
We also plotted the distribution of ARRD to see if the response variable is skewed.
kable(d.raw %>%
group_by(ref) %>%
summarise(mean_ARRD = mean(ARRD), var_ARRD = mean(Var_ARRD), prec = mean(precision),
max_ARRD = max(ARRD), min_ARRD = min(ARRD), mean_ARRf = mean(ARR_f), sd_ARRf = sd(ARR_f),
max_ARRf = max(ARR_f), min_ARRf = min(ARR_f), mean_ARRm = mean(ARR_m), sd_ARRm = sd(ARR_m),
max_ARRm = max(ARR_m), min_ARRm = min(ARR_m), n = n())) %>%
kable_styling("striped", position = "left") %>%
scroll_box(width = "100%", height = "500px")| ref | mean_ARRD | var_ARRD | prec | max_ARRD | min_ARRD | mean_ARRf | sd_ARRf | max_ARRf | min_ARRf | mean_ARRm | sd_ARRm | max_ARRm | min_ARRm | n |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Allen et al. 2012 | -0.0010898 | 0.0001854 | 76.118554 | 0.0198699 | -0.0437768 | 0.0900550 | 0.0262627 | 0.1330775 | 0.0474964 | 0.0911448 | 0.0227055 | 0.1427266 | 0.0635193 | 20 |
| Alveal et al. 2019 | 0.0750000 | 0.2389012 | 2.045930 | 0.0750000 | 0.0750000 | -0.2110000 | NA | -0.2110000 | -0.2110000 | -0.2860000 | NA | -0.2860000 | -0.2860000 | 1 |
| Anthony 2019 | 0.0647176 | 0.0023154 | 22.981454 | 0.1423122 | -0.0128770 | -0.0149012 | 0.0466632 | 0.0180947 | -0.0478970 | -0.0796188 | 0.0630722 | -0.0350200 | -0.1242175 | 2 |
| Artacho et al. 2017 | -0.0787933 | 0.0429659 | 5.051649 | 0.1086033 | -0.2661900 | -0.3060744 | 0.2002479 | -0.1644778 | -0.4476711 | -0.2272811 | 0.0647710 | -0.1814811 | -0.2730811 | 2 |
| Basson and Clusella-Trullas 2016 | -0.0258621 | 0.2252742 | 2.106902 | -0.0258621 | -0.0258621 | 0.3103448 | NA | 0.3103448 | 0.3103448 | 0.3362069 | NA | 0.3362069 | 0.3362069 | 1 |
| Botella-Cruz et al. 2016 | -0.0305815 | 0.1395659 | 4.070788 | 0.3758334 | -0.6000000 | -0.0958541 | 0.2284568 | 0.3233334 | -0.5388888 | -0.0652726 | 0.2000951 | 0.2700000 | -0.4187302 | 16 |
| Chung 2001 | -0.0072222 | 0.0183211 | 7.717205 | 0.1366667 | -0.2100000 | 0.1433333 | 0.0872799 | 0.2533333 | 0.0533333 | 0.1505556 | 0.0752896 | 0.2800000 | 0.0633333 | 6 |
| Cortemeglia and Beitinger 2006 | 0.0600000 | 0.0089853 | 10.549564 | 0.0600000 | 0.0600000 | 0.1600000 | NA | 0.1600000 | 0.1600000 | 0.1000000 | NA | 0.1000000 | 0.1000000 | 1 |
| Darnell et al. 2015 | -0.0350741 | 0.0014731 | 26.286444 | -0.0222222 | -0.0479259 | 0.2584444 | 0.0095328 | 0.2651852 | 0.2517037 | 0.2935185 | 0.0086424 | 0.2996296 | 0.2874074 | 2 |
| Davies et al. 2015 | 0.0621892 | 0.2774309 | 2.713077 | 0.8600000 | -0.4349333 | 0.2738981 | 0.3586072 | 0.9550000 | -0.5060000 | 0.2117089 | 0.2865826 | 1.1000000 | -0.1860000 | 18 |
| Do Amaral et al. 2002 | 0.0233750 | 0.0053409 | 14.095050 | 0.2565000 | -0.1480000 | -0.0463750 | 0.1175850 | 0.1235000 | -0.1470000 | -0.0697500 | 0.1057083 | 0.0740000 | -0.1630000 | 4 |
| Fangue and Bennett 2003 | 0.0129279 | 0.0038762 | 17.613402 | 0.0575342 | -0.0259941 | 0.3750718 | 0.0571309 | 0.4100457 | 0.2897260 | 0.3621439 | 0.0886229 | 0.4234168 | 0.2321918 | 4 |
| Fangue et al. 2006 | 0.0133863 | 0.0437233 | 8.098033 | 0.5176274 | -0.2381579 | 0.4721978 | 0.4414369 | 1.8228905 | -0.2330826 | 0.4588115 | 0.3779378 | 1.3052632 | -0.3552632 | 17 |
| Faulkner et al. 2014 | 0.0547020 | 0.0146890 | 14.088149 | 0.4196429 | -0.1181976 | 0.1172211 | 0.1640725 | 0.4887440 | -0.1130952 | 0.0625191 | 0.1600301 | 0.4577381 | -0.1864587 | 15 |
| Fries and Gibson 2010 | -0.0813467 | 0.0121751 | 13.140742 | -0.0099767 | -0.1527167 | 0.5411111 | 0.3549000 | 0.7920633 | 0.2901589 | 0.6224578 | 0.4558325 | 0.9447800 | 0.3001356 | 2 |
| Gvozdik et al. 2007 | 0.0095413 | 0.1375387 | 9.960750 | 0.0818333 | -0.0627508 | -0.2114262 | 0.5087769 | 0.1483333 | -0.5711858 | -0.2209675 | 0.4065404 | 0.0665000 | -0.5084350 | 2 |
| Haggerty 2016 | 0.0388430 | 0.0009023 | 33.291546 | 0.0388430 | 0.0388430 | 0.1024793 | NA | 0.1024793 | 0.1024793 | 0.0636364 | NA | 0.0636364 | 0.0636364 | 1 |
| Hernandez et al. 2002 | -0.7658183 | 0.0058803 | 13.040714 | -0.7658183 | -0.7658183 | 0.0307503 | NA | 0.0307503 | 0.0307503 | 0.7965686 | NA | 0.7965686 | 0.7965686 | 1 |
| Huang et al. 2020 | 0.6750000 | 0.0481458 | 4.557437 | 0.6750000 | 0.6750000 | 0.3500000 | NA | 0.3500000 | 0.3500000 | -0.3250000 | NA | -0.3250000 | -0.3250000 | 1 |
| Kelley et al. 2011 | 0.0409459 | 0.0224700 | 10.824818 | 0.2347282 | -0.1528365 | 0.2242297 | 0.0960638 | 0.2921571 | 0.1563024 | 0.1832838 | 0.1779858 | 0.3091388 | 0.0574288 | 2 |
| Kolbe et al. 2014 | 0.0223692 | 0.0050395 | 14.842259 | 0.0884110 | -0.0769756 | 0.1941600 | 0.0573785 | 0.2535842 | 0.0855095 | 0.1717908 | 0.0410203 | 0.2607527 | 0.1158901 | 9 |
| Krstevska and Hoffman 1994 | -0.0166754 | 0.0200704 | 7.139264 | 0.0000000 | -0.0333509 | 0.0166754 | 0.0136531 | 0.0263296 | 0.0070212 | 0.0333509 | 0.0099295 | 0.0403721 | 0.0263296 | 2 |
| Kubisch et al. 2016 | 0.0800385 | 0.0406666 | 11.871210 | 0.1144873 | 0.0455897 | 0.0459173 | 0.0419845 | 0.0756048 | 0.0162298 | -0.0341212 | 0.0067335 | -0.0293599 | -0.0388825 | 2 |
| Lin et al. 2019 | -0.3091675 | 0.0561906 | 4.303574 | -0.1791675 | -0.4391675 | -0.1404175 | 0.1573313 | -0.0291675 | -0.2516675 | 0.1687500 | 0.0265165 | 0.1875000 | 0.1500000 | 2 |
| Llewelyn et al. 2017 | -0.0111117 | 0.0023512 | 20.630710 | 0.0370367 | -0.0592600 | 0.0657406 | 0.0327367 | 0.0888889 | 0.0425922 | 0.0768522 | 0.0353553 | 0.1018522 | 0.0518522 | 2 |
| Lyons et al. 2012 | 0.0157399 | 0.0078726 | 14.009763 | 0.1677102 | -0.1868132 | 0.1123225 | 0.1102609 | 0.3890710 | -0.0535519 | 0.0965826 | 0.0865081 | 0.3118397 | -0.0338798 | 20 |
| Massamba-N’Siala et al. 2012 | -0.0010000 | 0.0098027 | 11.888592 | 0.1380000 | -0.1400000 | 0.0866667 | 0.0292271 | 0.1073333 | 0.0660000 | 0.0876667 | 0.2258028 | 0.2473333 | -0.0720000 | 2 |
| Mesher 2009 | -0.0204702 | 0.0173181 | 8.784751 | 0.2928330 | -0.3175000 | 0.1028159 | 0.1821068 | 0.3577770 | -0.3500000 | 0.1232861 | 0.1667344 | 0.4733330 | -0.1966670 | 16 |
| Morey et al. 2012 | -0.1164444 | 0.4264452 | 1.643966 | -0.0660000 | -0.1500000 | -0.2633333 | 0.2676440 | -0.0200000 | -0.5500000 | -0.1468889 | 0.2290175 | 0.0460000 | -0.4000000 | 3 |
| Pallares et al. 2020 | 0.1502860 | 0.0018708 | 23.119944 | 0.1502860 | 0.1502860 | 0.0692860 | NA | 0.0692860 | 0.0692860 | -0.0810000 | NA | -0.0810000 | -0.0810000 | 1 |
| Piyaphongkul et al. 2014 | 0.0333333 | 0.0021000 | 36.292079 | 0.0533333 | 0.0133333 | 0.2850000 | 0.1956849 | 0.5533333 | 0.0866667 | 0.2516667 | 0.1852626 | 0.5066667 | 0.0733333 | 4 |
| Ransberry et al. 2011 | 0.0123239 | 0.0002870 | 64.338580 | 0.0560363 | -0.0290551 | 0.2842276 | 0.0754234 | 0.3538644 | 0.2041132 | 0.2719037 | 0.1179443 | 0.3829195 | 0.1480769 | 3 |
| Reiser et al. 2014 | 0.0228571 | 0.0054276 | 14.624523 | 0.2080000 | -0.0760000 | 0.3451429 | 0.0908616 | 0.4800000 | 0.2000000 | 0.3222857 | 0.0605099 | 0.3780000 | 0.2420000 | 14 |
| Shinner et al. 2020 | 0.1300000 | 0.0445090 | 4.739975 | 0.1300000 | 0.1300000 | -0.2400000 | NA | -0.2400000 | -0.2400000 | -0.3700000 | NA | -0.3700000 | -0.3700000 | 1 |
| Spinks et al. 2019 | 0.0164600 | 0.0022729 | 20.975537 | 0.0164600 | 0.0164600 | 0.0007550 | NA | 0.0007550 | 0.0007550 | -0.0157050 | NA | -0.0157050 | -0.0157050 | 1 |
| Watson and McMahon 2008 | -0.0183474 | 0.0019498 | 30.079119 | 0.0768548 | -0.2663270 | 0.2857171 | 0.0608625 | 0.3991853 | 0.1715628 | 0.3040645 | 0.0861690 | 0.5366670 | 0.1474783 | 30 |
| Worthen and Haney 1999 | 0.0014000 | 0.0067280 | 15.414114 | 0.0334000 | -0.0250000 | 0.0354167 | 0.0569830 | 0.1268000 | -0.0400000 | 0.0340167 | 0.0528858 | 0.1300000 | -0.0150000 | 6 |
| Xia et al. 2019 | -0.0206388 | 0.0003303 | 57.059923 | 0.0566820 | -0.0963359 | 0.3431493 | 0.1234410 | 0.4457143 | 0.1945245 | 0.3637881 | 0.0593536 | 0.4302857 | 0.2908604 | 4 |
ggplot(d.raw, aes(ARRD)) + geom_histogram(fill = "darkcyan", col = "black", binwidth = 0.05) +
theme_classic()DataExplorerThe package DataExplorer provides useful functions for data exploration
Again, we can see that the coverage of MDI is much higher than SDI so we would rather use MDI for the analyses of sexual size dimorphism.
Besides the variables we extracted to answer our a priori hypotheses, we can see that we obtained a relatively good data coverage for longitude, elevation, season, year, method and endpoint
plot_missing(d.raw)outcome data is quite heterogenous. We obtained very few data on PBT (n=14)plot_bar(d.raw)We observe no major concerns visually
plot_histogram(d.raw)We plotted the response variables against all the tested moderators
The number of effect sizes for PBT is quite low. We can see that the minimum ARRD value for PBT is outside the range of the other values and has a strong precision. This observation (from Hernandez et al. 2002) will likely bias our estimate of PBT and it is probably better to exclude it for further analyses.
The impact of the exclusion of this data point will be tested in SENSITIVITY ANALYSES. Because the sample size of PBT data is very low (n=14), the likelihood of obtaining type II errors when testing whether ARRD vary between outcome variables is also important. Therefore, in SENSITIVITY ANALYSES, we will perform analyses without the entire PBT subset, and determine whether removing the data point from Hernandez et al. 2002 qualitatively modifies the results, relative to removing the entire PBT subset, and the entire data set.
ARRD_outcome<-ggplot(data=d.raw, aes(y=ARRD, x=outcome, col=outcome,size=precision))+
geom_hline(yintercept = 0,linetype = 2, colour = "black",alpha=0.5)+ # line for y = 0 (no difference between males and females)
geom_jitter(alpha=0.5)+ # display data points with a jitter, so they don't overlap
scale_size_continuous(range = c(1, 7))+ # change scaling of data points
labs(x="Type of outcome variable",y="ARRD") + # rename axis labels
theme_classic() # classic theme
ARRD_habitat<-ggplot(data=d.raw, aes(y=ARRD, x=habitat, col=habitat,size=precision))+
geom_hline(yintercept = 0,linetype = 2, colour = "black",alpha=0.5)+
geom_jitter(alpha=0.5)+
scale_size_continuous(range = c(1, 7))+
labs(x="Species habitat",y="ARRD") +
theme_classic()
ARRD_taxa<-ggplot(data=d.raw, aes(y=ARRD, x=taxonomic_group, col=taxonomic_group,size=precision))+
geom_hline(yintercept = 0,linetype = 2, colour = "black",alpha=0.5)+
geom_jitter(alpha=0.5)+
scale_size_continuous(range = c(1, 7))+
labs(x="Taxonomic group",y="ARRD",color = "taxon") +
theme_classic()
ARRD_origin<-ggplot(data=d.raw, aes(y=ARRD, x=origin, col=origin,size=precision))+
geom_hline(yintercept = 0,linetype = 2, colour = "black",alpha=0.5)+
geom_jitter(alpha=0.5)+
scale_size_continuous(range = c(1, 7))+
labs(x="Animals origin",y="ARRD")+
theme_classic()
plot_grid(ARRD_outcome, ARRD_habitat, ARRD_taxa, ARRD_origin, nrow = 2,ncol=2, labels = "auto", rel_heights = c(1, 1, 1,1))ARRD_latitude <- ggplot(data = d.raw, aes(y = ARRD, x = abs_latitude, size = precision)) +
geom_hline(yintercept = 0, linetype = 2, colour = "black", alpha = 0.5) + geom_point(col = "darkcyan",
alpha = 0.5) + scale_size_continuous(range = c(1, 9)) + labs(x = "Absolute latitude",
y = "ARRD") + theme_classic()
ARRD_longitude <- ggplot(data = d.raw, aes(y = ARRD, x = abs_longitude, size = precision)) +
geom_hline(yintercept = 0, linetype = 2, colour = "black", alpha = 0.5) + geom_point(col = "darkcyan",
alpha = 0.5) + scale_size_continuous(range = c(1, 9)) + labs(x = "Absolute Longitude",
y = "ARRD") + theme_classic()
ARRD_elevation <- ggplot(data = d.raw, aes(y = ARRD, x = elevation, size = precision)) +
geom_hline(yintercept = 0, linetype = 2, colour = "black", alpha = 0.5) + geom_point(col = "darkcyan",
alpha = 0.5) + scale_size_continuous(range = c(1, 9)) + labs(x = "Elevation",
y = "ARRD") + theme_classic()
plot_grid(ARRD_latitude, ARRD_longitude, ARRD_elevation, nrow = 2, labels = "auto",
rel_heights = c(1, 1, 1, 1, 1))ARRD_SDI <- ggplot(data = d.raw, aes(y = ARRD, x = SDI, size = precision)) + geom_hline(yintercept = 0,
linetype = 2, colour = "black", alpha = 0.5) + geom_vline(xintercept = 0, linetype = 2,
colour = "black", alpha = 0.5) + geom_point(col = "darkcyan", alpha = 0.5) +
scale_size_continuous(range = c(1, 9)) + labs(x = "Size dimorphism index", y = "ARRD") +
theme_classic()
ARRD_MDI <- ggplot(data = d.raw, aes(y = ARRD, x = MDI, size = precision)) + geom_hline(yintercept = 0,
linetype = 2, colour = "black", alpha = 0.5) + geom_vline(xintercept = 0, linetype = 2,
colour = "black", alpha = 0.5) + geom_point(col = "darkcyan", alpha = 0.5) +
scale_size_continuous(range = c(1, 9)) + labs(x = "Mass dimorphism index", y = "ARRD") +
theme_classic()
plot_grid(ARRD_SDI, ARRD_MDI, nrow = 1, ncol = 2, labels = "auto", rel_heights = c(1,
1, 1, 1, 1))ARRD_duration <- ggplot(data = d.raw, aes(y = ARRD, x = acc_duration, size = precision)) +
geom_hline(yintercept = 0, linetype = 2, colour = "black", alpha = 0.5) + geom_point(col = "darkcyan",
alpha = 0.5) + scale_size_continuous(range = c(1, 9)) + labs(x = "Duration of acclimation",
y = "ARRD") + theme_classic()
ARRD_ramping <- ggplot(data = d.raw, aes(y = ARRD, x = ramping.deg.min, size = precision)) +
geom_hline(yintercept = 0, linetype = 2, colour = "black", alpha = 0.5) + geom_point(col = "darkcyan",
alpha = 0.5) + scale_size_continuous(range = c(1, 9)) + labs(x = "Ramping rate",
y = "ARRD") + theme_classic()
plot_grid(ARRD_duration, ARRD_ramping, nrow = 1, ncol = 2, labels = "auto", rel_heights = c(1,
1, 1, 1, 1))ARRD_pub_year <- ggplot(data = d.raw, aes(y = ARRD, x = pub_year, col = pub_year,
size = precision)) + geom_hline(yintercept = 0, linetype = 2, colour = "black",
alpha = 0.5) + scale_size_continuous(range = c(1, 9)) + geom_point(col = "darkcyan",
alpha = 0.5) + scale_size_continuous(range = c(1, 9)) + labs(x = "Publication year",
y = "ARRD") + theme_classic()
ARRD_data_type <- ggplot(data = d.raw, aes(y = ARRD, x = data_type, col = data_type,
size = precision)) + geom_hline(yintercept = 0, linetype = 2, colour = "black",
alpha = 0.5) + scale_size_continuous(range = c(1, 7)) + geom_jitter(alpha = 0.5) +
labs(x = "Data type", y = "ARRD") + theme_classic()
ARRD_peer <- ggplot(data = d.raw, aes(y = ARRD, x = peer_reviewed, col = peer_reviewed,
size = precision)) + geom_hline(yintercept = 0, linetype = 2, colour = "black",
alpha = 0.5) + scale_size_continuous(range = c(1, 7)) + geom_jitter(alpha = 0.5) +
labs(x = "Peer-review", y = "ARRD") + theme_classic()
plot_grid(ARRD_pub_year, ARRD_data_type, ARRD_peer, nrow = 2, ncol = 2, labels = "auto",
rel_heights = c(1, 1, 1, 1, 1))Overall, the geographical coverage is very sparse
# Distribution of the data points
WorldData <- map_data("world")
ggplot(d.raw, aes(x = longitude, y = latitude, size = precision, col = taxonomic_group_sub)) +
geom_map(data = WorldData, map = WorldData, aes(x = long, y = lat, group = group,
map_id = region), fill = "white", colour = "#7f7f7f", size = 0.5) + geom_point(alpha = 0.6) +
scale_colour_viridis(discrete = T) + xlim(min(WorldData$long), max(WorldData$long)) +
ylim(min(WorldData$lat), max(WorldData$lat)) + theme_minimal() + labs(x = "Longitude",
y = "Latitude") + scale_size_continuous(range = c(2, 8))Hernandez et al. 2002Here we calculated the number of studies, species and effect sizes for the main categorical moderators. These sample sizes are different from the ones presented in Figure S5 as they have been calculated prior to the exclusion of the study from Hernandez et al. (2002).
d.raw %>%
summarise(
`Studies` = n_distinct(study_ID),
`Species` = n_distinct(species_ID),
`Levels (shared treatment)` = n_distinct(shared_trt_ID),
`Levels (shared measurement)` = n_distinct(shared_measurement_ID),
`Effect sizes` = n_distinct(es_ID),
`Effect sizes (LTL)` = n_distinct(es_ID[outcome=="LTL"]),
`Studies (LTL)` = n_distinct(study_ID[outcome=="LTL"]),
`Species (LTL)` = n_distinct(species_ID[outcome=="LTL"]),
`Effect sizes (UTL)` = n_distinct(es_ID[outcome=="UTL"]),
`Studies (UTL)` = n_distinct(study_ID[outcome=="UTL"]),
`Species (UTL)` = n_distinct(species_ID[outcome=="UTL"]),
`Effect sizes (PBT)` = n_distinct(es_ID[outcome=="PBT"]),
`Studies (PBT)` = n_distinct(study_ID[outcome=="PBT"]),
`Species (PBT)` = n_distinct(species_ID[outcome=="PBT"]),
`Effect sizes (invertebrates)` = n_distinct(es_ID[taxonomic_group=="invertebrate"]),
`Studies (invertebrates)` = n_distinct(study_ID[taxonomic_group=="invertebrate"]),
`Effect sizes (vertebrates)` = n_distinct(es_ID[taxonomic_group=="vertebrate"]),
`Studies (vertebrates)` = n_distinct(study_ID[taxonomic_group=="vertebrate"]),
`Effect sizes (Fishes)` = n_distinct(es_ID[taxonomic_group_sub=="Fishes"]),
`Studies (Fishes)` = n_distinct(study_ID[taxonomic_group_sub=="Fishes"]),
`Effect sizes (Reptiles and Amphibians)` = n_distinct(es_ID[taxonomic_group_sub=="Reptiles and Amphibians"]),
`Studies (Reptiles and Amphibians)` = n_distinct(study_ID[taxonomic_group_sub=="Reptiles and Amphibians"]),
`Effect sizes (Aquatic Invertebrates)` = n_distinct(es_ID[taxonomic_group_sub=="Aquatic Invertebrates"]),
`Studies (Aquatic Invertebrates)` = n_distinct(study_ID[taxonomic_group_sub=="Aquatic Invertebrates"]),
`Effect sizes (Terrestrial Invertebrates)` = n_distinct(es_ID[taxonomic_group_sub=="Terrestrial Invertebrates"]),
`Studies (Terrestrial Invertebrates)` = n_distinct(study_ID[taxonomic_group_sub=="Terrestrial Invertebrates"]),
`Effect sizes (aquatic)` = n_distinct(es_ID[habitat=="aquatic"]),
`Studies (aquatic)` = n_distinct(study_ID[habitat=="aquatic"]),
`Effect sizes (terrestrial)` = n_distinct(es_ID[habitat=="terrestrial"]),
`Studies (terrestrial)` = n_distinct(study_ID[habitat=="terrestrial"]),
`Effect sizes (wild)` = n_distinct(es_ID[origin=="wild"]),
`Studies (wild)` = n_distinct(study_ID[origin=="wild"]),
`Effect sizes (lab)` = n_distinct(es_ID[origin=="lab"]),
`Studies (lab)` = n_distinct(study_ID[origin=="lab"]),
`Effect sizes (published)` = n_distinct(es_ID[data_type=="published"]),
`Studies (published)` = n_distinct(study_ID[data_type=="published"]),
`Effect sizes (unpublished)` = n_distinct(es_ID[data_type=="unpublished"]),
`Studies (unpublished)` = n_distinct(study_ID[data_type=="unpublished"]),
`origin`=n_distinct(study_ID[origin=="lab"])
) -> table_sample_sizes.raw
table_sample_sizes.raw<-t(table_sample_sizes.raw)
colnames(table_sample_sizes.raw)<-"n (sample size)"
kable(table_sample_sizes.raw) %>% kable_styling("striped", position="left") | n (sample size) | |
|---|---|
| Studies | 38 |
| Species | 45 |
| Levels (shared treatment) | 185 |
| Levels (shared measurement) | 216 |
| Effect sizes | 240 |
| Effect sizes (LTL) | 103 |
| Studies (LTL) | 21 |
| Species (LTL) | 21 |
| Effect sizes (UTL) | 123 |
| Studies (UTL) | 21 |
| Species (UTL) | 29 |
| Effect sizes (PBT) | 14 |
| Studies (PBT) | 9 |
| Species (PBT) | 10 |
| Effect sizes (invertebrates) | 129 |
| Studies (invertebrates) | 17 |
| Effect sizes (vertebrates) | 111 |
| Studies (vertebrates) | 21 |
| Effect sizes (Fishes) | 66 |
| Studies (Fishes) | 9 |
| Effect sizes (Reptiles and Amphibians) | 45 |
| Studies (Reptiles and Amphibians) | 12 |
| Effect sizes (Aquatic Invertebrates) | 53 |
| Studies (Aquatic Invertebrates) | 7 |
| Effect sizes (Terrestrial Invertebrates) | 76 |
| Studies (Terrestrial Invertebrates) | 10 |
| Effect sizes (aquatic) | 137 |
| Studies (aquatic) | 19 |
| Effect sizes (terrestrial) | 103 |
| Studies (terrestrial) | 19 |
| Effect sizes (wild) | 166 |
| Studies (wild) | 24 |
| Effect sizes (lab) | 72 |
| Studies (lab) | 15 |
| Effect sizes (published) | 109 |
| Studies (published) | 18 |
| Effect sizes (unpublished) | 131 |
| Studies (unpublished) | 21 |
| origin | 15 |
d <- subset(d.raw, ref != "Hernandez et al. 2002")d <- as_tibble(d)
write.csv(d, file = "data/data_processed.csv")The data set that will be used for the rest of the analyses was named d
d <- read_csv("data/data_processed.csv")
d$es_ID = as.factor(d$es_ID)
d$species_ID = as.factor(d$species_ID)
d$study_ID = as.factor(d$study_ID)
d$shared_trt_ID = as.factor(d$shared_trt_ID)
d$shared_measurement_ID = as.factor(d$shared_measurement_ID)
d$data_type = as.factor(d$data_type)
d$peer_reviewed = as.factor(d$peer_reviewed)
d$class = as.factor(d$class)
d$order = as.factor(d$order)
d$genus_species = as.factor(d$genus_species)
d$habitat = as.factor(d$habitat)
d$taxonomic_group = as.factor(d$taxonomic_group)
d$taxonomic_group_sub = as.factor(d$taxonomic_group_sub)
d$life_stage = as.factor(d$life_stage)
d$origin = as.factor(d$origin)
d$season = as.factor(d$season)
d$outcome = as.factor(d$outcome)
d$method = as.factor(d$method)
d$endpoint = as.factor(d$endpoint)
d$gravidity = as.factor(d$gravidity)Standardize the continuous variables
scale: z-transformation (i.e. mean=0, standard deviation=1). We standardized all continuous moderators we tested to facilitate the interpretation of the coefficients.
d$z_abs_latitude <- scale(d$abs_latitude)
d$z_acc_duration <- scale(d$acc_duration)
d$z_ramping.deg.min <- scale(d$ramping.deg.min)
d$z_pub_year <- scale(d$pub_year)Because there is a strong overlap between the number of studies (study_ID, n=37) and the number of species (species_ID, n=44), we cannot include both variables as random effects in the models. Therefore, we decided to keep species_ID because it has more levels.
Because there is a strong overlap between shared measurement ID (shared_measurement_ID, n=214) and effect size ID (es_ID, n=238), we cannot include both variables as random effects in the model. Therefore, we will only account for the non-independence of traits measured on the same cohorts by using a variance-covariance matrix (see calculations of VCV_ARRD in the next section) and use es_ID as a random term in the models.
Because we can only include one variance-covariance matrix in the models, we accounted for non-independence of comparisons involving the same experimental groups (shared_trt_ID) by dividing the sample size of these groups by half. This adjustment was made directly in the spreadsheet.
Because we removed the observation from Hernandez et al. 2002, the sample size presented here is different from the one presented in the PRISMA diagram (which presents all effects sizes prior to the data attrition). The distribution of sample sizes is also presented in a readable format in Figure S5.
d %>%
summarise( # Calculate the number of effect sizes, studies and species for the main categorical variables
`Studies` = n_distinct(study_ID),
`Species` = n_distinct(species_ID),
`Levels (shared treatment)` = n_distinct(shared_trt_ID),
`Levels (shared measurement)` = n_distinct(shared_measurement_ID),
`Effect sizes` = n_distinct(es_ID),
`Effect sizes (LTL)` = n_distinct(es_ID[outcome=="LTL"]),
`Studies (LTL)` = n_distinct(study_ID[outcome=="LTL"]),
`Species (LTL)` = n_distinct(species_ID[outcome=="LTL"]),
`Effect sizes (UTL)` = n_distinct(es_ID[outcome=="UTL"]),
`Studies (UTL)` = n_distinct(study_ID[outcome=="UTL"]),
`Species (UTL)` = n_distinct(species_ID[outcome=="UTL"]),
`Effect sizes (PBT)` = n_distinct(es_ID[outcome=="PBT"]),
`Studies (PBT)` = n_distinct(study_ID[outcome=="PBT"]),
`Species (PBT)` = n_distinct(species_ID[outcome=="PBT"]),
`Effect sizes (invertebrates)` = n_distinct(es_ID[taxonomic_group=="invertebrate"]),
`Studies (invertebrates)` = n_distinct(study_ID[taxonomic_group=="invertebrate"]),
`Effect sizes (vertebrates)` = n_distinct(es_ID[taxonomic_group=="vertebrate"]),
`Studies (vertebrates)` = n_distinct(study_ID[taxonomic_group=="vertebrate"]),
`Effect sizes (Fishes)` = n_distinct(es_ID[taxonomic_group_sub=="Fishes"]),
`Studies (Fishes)` = n_distinct(study_ID[taxonomic_group_sub=="Fishes"]),
`Effect sizes (Reptiles and Amphibians)` = n_distinct(es_ID[taxonomic_group_sub=="Reptiles and Amphibians"]),
`Studies (Reptiles and Amphibians)` = n_distinct(study_ID[taxonomic_group_sub=="Reptiles and Amphibians"]),
`Effect sizes (Aquatic Invertebrates)` = n_distinct(es_ID[taxonomic_group_sub=="Aquatic Invertebrates"]),
`Studies (Aquatic Invertebrates)` = n_distinct(study_ID[taxonomic_group_sub=="Aquatic Invertebrates"]),
`Effect sizes (Terrestrial Invertebrates)` = n_distinct(es_ID[taxonomic_group_sub=="Terrestrial Invertebrates"]),
`Studies (Terrestrial Invertebrates)` = n_distinct(study_ID[taxonomic_group_sub=="Terrestrial Invertebrates"]),
`Effect sizes (aquatic)` = n_distinct(es_ID[habitat=="aquatic"]),
`Studies (aquatic)` = n_distinct(study_ID[habitat=="aquatic"]),
`Effect sizes (terrestrial)` = n_distinct(es_ID[habitat=="terrestrial"]),
`Studies (terrestrial)` = n_distinct(study_ID[habitat=="terrestrial"]),
`Effect sizes (wild)` = n_distinct(es_ID[origin=="wild"]),
`Studies (wild)` = n_distinct(study_ID[origin=="wild"]),
`Effect sizes (lab)` = n_distinct(es_ID[origin=="lab"]),
`Studies (lab)` = n_distinct(study_ID[origin=="lab"]),
`Effect sizes (published)` = n_distinct(es_ID[data_type=="published"]),
`Studies (published)` = n_distinct(study_ID[data_type=="published"]),
`Effect sizes (unpublished)` = n_distinct(es_ID[data_type=="unpublished"]),
`Studies (unpublished)` = n_distinct(study_ID[data_type=="unpublished"]),
) -> table_sample_sizes
table_sample_sizes<-t(table_sample_sizes)
colnames(table_sample_sizes)<-"n (sample size)"
kable(table_sample_sizes) %>% kable_styling("striped", position="left")| n (sample size) | |
|---|---|
| Studies | 37 |
| Species | 44 |
| Levels (shared treatment) | 184 |
| Levels (shared measurement) | 215 |
| Effect sizes | 239 |
| Effect sizes (LTL) | 103 |
| Studies (LTL) | 21 |
| Species (LTL) | 21 |
| Effect sizes (UTL) | 123 |
| Studies (UTL) | 21 |
| Species (UTL) | 29 |
| Effect sizes (PBT) | 13 |
| Studies (PBT) | 8 |
| Species (PBT) | 9 |
| Effect sizes (invertebrates) | 129 |
| Studies (invertebrates) | 17 |
| Effect sizes (vertebrates) | 110 |
| Studies (vertebrates) | 20 |
| Effect sizes (Fishes) | 65 |
| Studies (Fishes) | 8 |
| Effect sizes (Reptiles and Amphibians) | 45 |
| Studies (Reptiles and Amphibians) | 12 |
| Effect sizes (Aquatic Invertebrates) | 53 |
| Studies (Aquatic Invertebrates) | 7 |
| Effect sizes (Terrestrial Invertebrates) | 76 |
| Studies (Terrestrial Invertebrates) | 10 |
| Effect sizes (aquatic) | 136 |
| Studies (aquatic) | 18 |
| Effect sizes (terrestrial) | 103 |
| Studies (terrestrial) | 19 |
| Effect sizes (wild) | 165 |
| Studies (wild) | 23 |
| Effect sizes (lab) | 72 |
| Studies (lab) | 15 |
| Effect sizes (published) | 108 |
| Studies (published) | 17 |
| Effect sizes (unpublished) | 131 |
| Studies (unpublished) | 21 |
We first matched the species names genus_species with the Open Tree Taxonomy
taxa <- tnrs_match_names(names = levels(d$genus_species), context_name = "Animals")
kable(taxa) %>%
kable_styling("striped", position = "left") # Check if all species names match with the Open Tree Taxonomy| search_string | unique_name | approximate_match | ott_id | is_synonym | flags | number_matches |
|---|---|---|---|---|---|---|
| acanthochromis polyacanthus | Acanthochromis polyacanthus | FALSE | 100410 | FALSE | incertae_sedis_inherited | 1 |
| anolis sagrei | Anolis sagrei | FALSE | 970153 | FALSE | 1 | |
| anopheles arabiensis | Anopheles arabiensis | FALSE | 218728 | FALSE | 2 | |
| anopheles funestus | Anopheles funestus | FALSE | 286257 | FALSE | 1 | |
| carcinus maenas | Carcinus maenas | FALSE | 1089892 | FALSE | 1 | |
| cordylus oelofseni | Cordylus oelofseni | FALSE | 487423 | FALSE | 1 | |
| corophium volutator | Corophium volutator | FALSE | 1054530 | FALSE | 1 | |
| crangon crangon | Crangon crangon | FALSE | 497498 | FALSE | sibling_higher | 1 |
| danio rerio | Danio rerio | FALSE | 1005914 | FALSE | 1 | |
| dasyatis sabina | Dasyatis sabina | FALSE | 351766 | FALSE | sibling_higher | 1 |
| dionda diaboli | Dionda diaboli | FALSE | 222446 | FALSE | 1 | |
| drosophila falleni | Drosophila falleni | FALSE | 86637 | FALSE | 1 | |
| drosophila melanogaster | Drosophila melanogaster | FALSE | 505714 | FALSE | 1 | |
| drosophila putrida | Drosophila putrida | FALSE | 871280 | FALSE | 1 | |
| drosophila simulans | Drosophila simulans | FALSE | 660828 | FALSE | 1 | |
| drosophila tripunctata | Drosophila tripunctata | FALSE | 940413 | FALSE | 1 | |
| eleutherodactylus coqui | Eleutherodactylus coqui | FALSE | 1085754 | FALSE | 1 | |
| enochrus politus | Enochrus politus | FALSE | 3341759 | FALSE | 1 | |
| eutropis longicaudata | Eutropis longicaudata | FALSE | 391880 | FALSE | 1 | |
| eutropis multifasciata | Eutropis multifasciata | FALSE | 621434 | FALSE | 1 | |
| exosphaeroma gigas | Exosphaeroma gigas | FALSE | 2995748 | FALSE | 1 | |
| exosphaeroma laeviusculum | Exosphaeroma laeviusculum | FALSE | 2995772 | FALSE | 1 | |
| fundulus heteroclitus | Fundulus heteroclitus | FALSE | 583633 | FALSE | 1 | |
| gambusia affinis | Gambusia affinis | FALSE | 617445 | FALSE | 1 | |
| gammarus chevreuxi | Gammarus chevreuxi | FALSE | 343320 | FALSE | 1 | |
| gammarus marinus | Marinogammarus marinus | FALSE | 5809983 | TRUE | 1 | |
| harmonia axyridis | Harmonia axyridis | FALSE | 258281 | FALSE | 1 | |
| helicoverpa zea | Helicoverpa zea | FALSE | 167928 | FALSE | 1 | |
| hyale grandicornis | Hyale grandicornis | FALSE | 2983574 | FALSE | 2 | |
| hyale hirtipalma | Apohyale hirtipalma | FALSE | 2983536 | TRUE | 1 | |
| hydroporus sabaudus | Hydroporus sabaudus | FALSE | 1024850 | FALSE | 1 | |
| hyperolius marmoratus | Hyperolius marmoratus | FALSE | 441372 | FALSE | 1 | |
| lampropholis coggeri | Lampropholis coggeri | FALSE | 1073190 | FALSE | 1 | |
| liolaemus pictus | Liolaemus pictus | FALSE | 665055 | FALSE | 1 | |
| nilaparvata lugens | Nilaparvata lugens | FALSE | 876508 | FALSE | 1 | |
| ophryotrocha labronica | Ophryotrocha labronica | FALSE | 864359 | FALSE | 1 | |
| pardosa furcifera | Pardosa furcifera | FALSE | 339957 | FALSE | 1 | |
| pleurodema thaul | Pleurodema thaul | FALSE | 67848 | FALSE | sibling_higher | 1 |
| poecilia reticulata | Poecilia reticulata | FALSE | 312452 | FALSE | 1 | |
| tenebrio molitor | Tenebrio molitor | FALSE | 1093470 | FALSE | 1 | |
| terrapene carolina | Terrapene carolina | FALSE | 848786 | FALSE | 1 | |
| terrapene ornata | Terrapene ornata | FALSE | 1013359 | FALSE | 1 | |
| triturus dobrogicus | Triturus dobrogicus | FALSE | 1041781 | FALSE | 1 | |
| uca panacea | Leptuca panacea | FALSE | 813090 | TRUE | 1 |
d$genus_species <- str_replace(d$genus_species, "Gammarus marinus", "Marinogammarus marinus") # Replace names to match with Open Tree Taxonomy
d$genus_species <- str_replace(d$genus_species, "Hyale hirtipalma", "Apohyale hirtipalma") # Replace names to match with Open Tree Taxonomy
d$genus_species <- str_replace(d$genus_species, "Uca panacea", "Leptuca panacea") # Replace names to match with Open Tree Taxonomy
phylo_tree <- tol_induced_subtree(ott_ids = taxa$ott_id, label_format = "name") # Generate the phylogenetic treeWe had a polytomy between the amphipods taxa (Gammaridae, Hyalidae and Corophiidae). We resolved the polytomy as random.
is.binary(phylo_tree) # Check if the tree is binary (= are there some polytomies?)## [1] FALSE
plot(phylo_tree) # check for polytomies visuallyset.seed(1234)
binary_tree <- multi2di(phylo_tree, random = TRUE) # resolve polytomy at random with a set seed
is.binary(binary_tree) # the tree is now binary## [1] TRUE
set.seed(1234)
binary_tree <- multi2di(phylo_tree, random = TRUE) # This part need to be run once again to generate the same tree in a different code chunk
png("output/phylogeny.png", bg = "transparent", height = 15, width = 8, units = "in",
res = 1200)
plot(binary_tree)
dev.off()## png
## 2
phylo_matrix : variance-covariance matrix of the phylogenetic correlation between the species
d$genus_species <- as.factor(d$genus_species) # convert genus_species (species name) as a factor
binary_tree$tip.label <- as.factor(binary_tree$tip.label) # convert the species names in the tree as a factor
levels(binary_tree$tip.label) <- levels(d$genus_species) # make sure names match
binary_tree$tip.label <- as.character(binary_tree$tip.label) # convert names back to characters
# Compute branch length
phylo_branch <- compute.brlen(binary_tree, method = "Grafen", power = 1)
is.ultrametric(phylo_branch) # check if tree is ultrametric## [1] TRUE
# Create a phylogenetic matrix
phylo_matrix <- vcv(phylo_branch, cor = T) # the vcv function returns a variance-covariance matrix
kable(phylo_matrix, "html") %>%
kable_styling("striped", position = "left") %>%
scroll_box(width = "100%", height = "500px")| Terrapene ornata | Terrapene carolina | Anolis sagrei | Leptuca panacea | Eutropis multifasciata | Eutropis longicaudata | Hyperolius marmoratus | Cordylus oelofseni | Marinogammarus marinus | Pleurodema thaul | Eleutherodactylus coqui | Triturus dobrogicus | Dionda diaboli | Danio rerio | Acanthochromis polyacanthus | Poecilia reticulata | Gambusia affinis | Fundulus heteroclitus | Dasyatis sabina | Ophryotrocha labronica | Helicoverpa zea | Drosophila putrida | Drosophila falleni | Drosophila tripunctata | Drosophila melanogaster | Drosophila simulans | Anopheles funestus | Anopheles arabiensis | Tenebrio molitor | Harmonia axyridis | Enochrus politus | Hydroporus sabaudus | Nilaparvata lugens | Exosphaeroma gigas | Exosphaeroma laeviusculum | Corophium volutator | Apohyale hirtipalma | Hyale grandicornis | Gammarus chevreuxi | Liolaemus pictus | Crangon crangon | Lampropholis coggeri | Carcinus maenas | Pardosa furcifera | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Terrapene ornata | 1.0000000 | 0.9767442 | 0.8372093 | 0.8372093 | 0.8372093 | 0.8372093 | 0.8372093 | 0.8372093 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Terrapene carolina | 0.9767442 | 1.0000000 | 0.8372093 | 0.8372093 | 0.8372093 | 0.8372093 | 0.8372093 | 0.8372093 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Anolis sagrei | 0.8372093 | 0.8372093 | 1.0000000 | 0.9767442 | 0.8837209 | 0.8837209 | 0.8837209 | 0.8837209 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Leptuca panacea | 0.8372093 | 0.8372093 | 0.9767442 | 1.0000000 | 0.8837209 | 0.8837209 | 0.8837209 | 0.8837209 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Eutropis multifasciata | 0.8372093 | 0.8372093 | 0.8837209 | 0.8837209 | 1.0000000 | 0.9767442 | 0.9534884 | 0.9302326 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Eutropis longicaudata | 0.8372093 | 0.8372093 | 0.8837209 | 0.8837209 | 0.9767442 | 1.0000000 | 0.9534884 | 0.9302326 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Hyperolius marmoratus | 0.8372093 | 0.8372093 | 0.8837209 | 0.8837209 | 0.9534884 | 0.9534884 | 1.0000000 | 0.9302326 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Cordylus oelofseni | 0.8372093 | 0.8372093 | 0.8837209 | 0.8837209 | 0.9302326 | 0.9302326 | 0.9302326 | 1.0000000 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Marinogammarus marinus | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 1.0000000 | 0.9534884 | 0.9534884 | 0.9302326 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Pleurodema thaul | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.9534884 | 1.0000000 | 0.9767442 | 0.9302326 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Eleutherodactylus coqui | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.9534884 | 0.9767442 | 1.0000000 | 0.9302326 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Triturus dobrogicus | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.9302326 | 0.9302326 | 0.9302326 | 1.0000000 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Dionda diaboli | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 1.0000000 | 0.9767442 | 0.8837209 | 0.8837209 | 0.8837209 | 0.8837209 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Danio rerio | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.9767442 | 1.0000000 | 0.8837209 | 0.8837209 | 0.8837209 | 0.8837209 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Acanthochromis polyacanthus | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.8837209 | 0.8837209 | 1.0000000 | 0.9302326 | 0.9302326 | 0.9302326 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Poecilia reticulata | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.8837209 | 0.8837209 | 0.9302326 | 1.0000000 | 0.9767442 | 0.9534884 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Gambusia affinis | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.8837209 | 0.8837209 | 0.9302326 | 0.9767442 | 1.0000000 | 0.9534884 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Fundulus heteroclitus | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.6046512 | 0.8837209 | 0.8837209 | 0.9302326 | 0.9534884 | 0.9534884 | 1.0000000 | 0.5813953 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Dasyatis sabina | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 0.5813953 | 1.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 |
| Ophryotrocha labronica | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 1.0000000 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 | 0.4418605 |
| Helicoverpa zea | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 1.0000000 | 0.8372093 | 0.8372093 | 0.8372093 | 0.8372093 | 0.8372093 | 0.8372093 | 0.8372093 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7209302 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4651163 |
| Drosophila putrida | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.8372093 | 1.0000000 | 0.9767442 | 0.9534884 | 0.9069767 | 0.9069767 | 0.8604651 | 0.8604651 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7209302 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4651163 |
| Drosophila falleni | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.8372093 | 0.9767442 | 1.0000000 | 0.9534884 | 0.9069767 | 0.9069767 | 0.8604651 | 0.8604651 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7209302 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4651163 |
| Drosophila tripunctata | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.8372093 | 0.9534884 | 0.9534884 | 1.0000000 | 0.9069767 | 0.9069767 | 0.8604651 | 0.8604651 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7209302 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4651163 |
| Drosophila melanogaster | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.8372093 | 0.9069767 | 0.9069767 | 0.9069767 | 1.0000000 | 0.9767442 | 0.8604651 | 0.8604651 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7209302 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4651163 |
| Drosophila simulans | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.8372093 | 0.9069767 | 0.9069767 | 0.9069767 | 0.9767442 | 1.0000000 | 0.8604651 | 0.8604651 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7209302 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4651163 |
| Anopheles funestus | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.8372093 | 0.8604651 | 0.8604651 | 0.8604651 | 0.8604651 | 0.8604651 | 1.0000000 | 0.9767442 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7209302 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4651163 |
| Anopheles arabiensis | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.8372093 | 0.8604651 | 0.8604651 | 0.8604651 | 0.8604651 | 0.8604651 | 0.9767442 | 1.0000000 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7209302 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4651163 |
| Tenebrio molitor | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 1.0000000 | 0.9767442 | 0.9534884 | 0.9302326 | 0.7209302 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4651163 |
| Harmonia axyridis | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.9767442 | 1.0000000 | 0.9534884 | 0.9302326 | 0.7209302 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4651163 |
| Enochrus politus | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.9534884 | 0.9534884 | 1.0000000 | 0.9302326 | 0.7209302 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4651163 |
| Hydroporus sabaudus | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.7441860 | 0.9302326 | 0.9302326 | 0.9302326 | 1.0000000 | 0.7209302 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4651163 |
| Nilaparvata lugens | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.7209302 | 0.7209302 | 0.7209302 | 0.7209302 | 0.7209302 | 0.7209302 | 0.7209302 | 0.7209302 | 0.7209302 | 0.7209302 | 0.7209302 | 0.7209302 | 1.0000000 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4651163 |
| Exosphaeroma gigas | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 1.0000000 | 0.9767442 | 0.8604651 | 0.8604651 | 0.8604651 | 0.8604651 | 0.8604651 | 0.7906977 | 0.7906977 | 0.7906977 | 0.4651163 |
| Exosphaeroma laeviusculum | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.9767442 | 1.0000000 | 0.8604651 | 0.8604651 | 0.8604651 | 0.8604651 | 0.8604651 | 0.7906977 | 0.7906977 | 0.7906977 | 0.4651163 |
| Corophium volutator | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.8604651 | 0.8604651 | 1.0000000 | 0.9069767 | 0.9069767 | 0.9069767 | 0.9069767 | 0.7906977 | 0.7906977 | 0.7906977 | 0.4651163 |
| Apohyale hirtipalma | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.8604651 | 0.8604651 | 0.9069767 | 1.0000000 | 0.9767442 | 0.9302326 | 0.9302326 | 0.7906977 | 0.7906977 | 0.7906977 | 0.4651163 |
| Hyale grandicornis | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.8604651 | 0.8604651 | 0.9069767 | 0.9767442 | 1.0000000 | 0.9302326 | 0.9302326 | 0.7906977 | 0.7906977 | 0.7906977 | 0.4651163 |
| Gammarus chevreuxi | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.8604651 | 0.8604651 | 0.9069767 | 0.9302326 | 0.9302326 | 1.0000000 | 0.9767442 | 0.7906977 | 0.7906977 | 0.7906977 | 0.4651163 |
| Liolaemus pictus | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.8604651 | 0.8604651 | 0.9069767 | 0.9302326 | 0.9302326 | 0.9767442 | 1.0000000 | 0.7906977 | 0.7906977 | 0.7906977 | 0.4651163 |
| Crangon crangon | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.7906977 | 0.7906977 | 0.7906977 | 0.7906977 | 0.7906977 | 0.7906977 | 0.7906977 | 1.0000000 | 0.9534884 | 0.9534884 | 0.4651163 |
| Lampropholis coggeri | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.7906977 | 0.7906977 | 0.7906977 | 0.7906977 | 0.7906977 | 0.7906977 | 0.7906977 | 0.9534884 | 1.0000000 | 0.9767442 | 0.4651163 |
| Carcinus maenas | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.4883721 | 0.7906977 | 0.7906977 | 0.7906977 | 0.7906977 | 0.7906977 | 0.7906977 | 0.7906977 | 0.9534884 | 0.9767442 | 1.0000000 | 0.4651163 |
| Pardosa furcifera | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.4418605 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 0.4651163 | 1.0000000 |
Taken from metaAidR - https://github.com/daniel1noble/metaAidR/blob/master/R/make_VCV_matrix.R
Using this function is akin to the formula we presented in the manuscript, with the correlation between sampling variances taken to be r = 0.5.
#' @title Covariance and correlation matrix function basing on shared level ID
#' @description Function for generating simple covariance and correlation matrices
#' @param data Dataframe object containing effect sizes, their variance, unique IDs and clustering variable
#' @param V Name of the variable (as a string – e.g, 'V1') containing effect size variances variances
#' @param cluster Name of the variable (as a string – e.g, 'V1') indicating which effects belong to the same cluster. Same value of 'cluster' are assumed to be nonindependent (correlated).
#' @param obs Name of the variable (as a string – e.g, 'V1') containing individual IDs for each value in the V (Vector of variances). If this parameter is missing, label will be labelled with consecutive integers starting from 1.
#' @param rho Known or assumed correlation value among effect sizes sharing same 'cluster' value. Default value is 0.5.
#' @param type Optional logical parameter indicating whether a full variance-covariance matrix (default or 'vcv') is needed or a correlation matrix ('cor') for the non-independent blocks of variance values.
#' @export
make_VCV_matrix <- function(data, V, cluster, obs, type = c("vcv", "cor"), rho = 0.5) {
type <- match.arg(type)
if (missing(data)) {
stop("Must specify dataframe via 'data' argument.")
}
if (missing(V)) {
stop("Must specify name of the variance variable via 'V' argument.")
}
if (missing(cluster)) {
stop("Must specify name of the clustering variable via 'cluster' argument.")
}
if (missing(obs)) {
obs <- 1:length(V)
}
if (missing(type)) {
type <- "vcv"
}
new_matrix <- matrix(0, nrow = dim(data)[1], ncol = dim(data)[1]) #make empty matrix of the same size as data length
rownames(new_matrix) <- data[, obs]
colnames(new_matrix) <- data[, obs]
# find start and end coordinates for the subsets
shared_coord <- which(data[, cluster] %in% data[duplicated(data[, cluster]),
cluster] == TRUE)
# matrix of combinations of coordinates for each experiment with shared
# control
combinations <- do.call("rbind", tapply(shared_coord, data[shared_coord, cluster],
function(x) t(utils::combn(x, 2))))
if (type == "vcv") {
# calculate covariance values between values at the positions in
# shared_list and place them on the matrix
for (i in 1:dim(combinations)[1]) {
p1 <- combinations[i, 1]
p2 <- combinations[i, 2]
p1_p2_cov <- rho * sqrt(data[p1, V]) * sqrt(data[p2, V])
new_matrix[p1, p2] <- p1_p2_cov
new_matrix[p2, p1] <- p1_p2_cov
}
diag(new_matrix) <- data[, V] #add the diagonal
}
if (type == "cor") {
# calculate covariance values between values at the positions in
# shared_list and place them on the matrix
for (i in 1:dim(combinations)[1]) {
p1 <- combinations[i, 1]
p2 <- combinations[i, 2]
p1_p2_cov <- rho
new_matrix[p1, p2] <- p1_p2_cov
new_matrix[p2, p1] <- p1_p2_cov
}
diag(new_matrix) <- 1 #add the diagonal of 1
}
return(new_matrix)
}var(d$ARRD)## [1] 0.02374816
Sample sizes)We used the rma.mv function from the package metafor to run all meta-analytic models and meta-regressions. This function allows to incorporate variance-covariance matrices in the V term.
genus_species (phylogenetic correlation between species) does not account for any variance in the model. We originally decided to remove this random effect from the analyses but we were advised, during the peer-review process, to keep it to account for statistical non-independence due to shared evolutionary history.
meta_ana_model<-rma.mv(yi=ARRD~1, V=VCV_ARRD, # Intercept model
method="REML", # Restricted maximum likelihood
random=list(~1|species_ID,
~1|genus_species,
~1|es_ID), # all possible random effects
R = list(genus_species = phylo_matrix), # Assign the genus_species term to the phylogenetic correlation matrix created earlier
data=d)
summary(meta_ana_model) # Results of the model##
## Multivariate Meta-Analysis Model (k = 239; method: REML)
##
## logLik Deviance AIC BIC AICc
## 208.4347 -416.8695 -408.8695 -394.9804 -408.6978
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0001 0.0076 44 no species_ID no
## sigma^2.2 0.0001 0.0083 44 no genus_species yes
## sigma^2.3 0.0008 0.0278 239 no es_ID no
##
## Test for Heterogeneity:
## Q(df = 238) = 383.0201, p-val < .0001
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## 0.0056 0.0069 0.8186 0.4130 -0.0079 0.0192
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The i2_ml function in the package orchaRd allows a simple calculation of heterogeneity
# To install the orchaRd package:
# devtools::install_github('itchyshin/orchard_plot', subdir = 'orchaRd', force
# = TRUE, build_vignettes = TRUE)
i2_ml(meta_ana_model)## I2_total I2_species_ID I2_genus_species I2_es_ID
## 0.43862487 0.02798587 0.03343257 0.37720643
If ARRD is positive, females are more plastic. If ARRD is negative, males are more plastic
orchard_plot(meta_ana_model,mod="Int",xlab="ARRD")+ # core of the function
annotate(geom = "text", x = -0.5, y = 1.5, label = paste0("italic(I)^{2} == ", round(i2_ml(meta_ana_model)[1] * 100, 2)), color = "black", parse = TRUE, size = 5) + # display heterogeneity
geom_errorbarh(aes(xmin = lowerPR, xmax = upperPR), height = 0, show.legend = FALSE, size = 0.8, alpha = 0.6)+ # change the thickness of prediction intervals
geom_errorbarh(aes(xmin = lowerCL, xmax = upperCL), height = 0.04, show.legend = FALSE, size = 1)+ # change the thickness of confidence intervals
annotate(geom = "text", x = -0.32, y = 1.49, label = "%", color = "black", parse = FALSE, size = 5) +
geom_point(aes(fill = name), size = 4, shape = 21)+ # change mean estimate point size
scale_colour_manual(values = "darkcyan")+ # change colour of data points
scale_fill_manual(values="gold") + # change colour of the mean estimate
scale_y_discrete(labels = "Overall mean")+ # rename y label
scale_size_continuous(range = c(1, 9)) + # change scaling of data points
theme(text = element_text(size = 20, colour = "black", hjust = 0.5),
axis.text.y = element_text(size = 15,colour = "black", hjust = 0.5),
legend.title = element_text(size=16))To avoid repeating the same lines of codes, we created a function run.model to run the models wit the same random effect structure. Because some models will be performed on subsets of data, we also generate a new variance covariance matrix for the specific data set that will be used in the model.
run.model<-function(data,formula){
data<-as.data.frame(data) # convert data set into a data frame to calculate VCV matrix
VCV<-make_VCV_matrix(data, V="Var_ARRD", cluster="shared_measurement_ID", obs="es_ID") # create VCV matrix for the specified data
rma.mv(yi=ARRD, V=VCV, # run the model, as described earlier
method="REML",
mods= formula,
random=list(~1|species_ID,
~1|genus_species,
~1|es_ID), # all possible random effects
R = list(genus_species = phylo_matrix),
data=data)
}Because most of the moderators we tested have only two levels, we created a function plot.two.levels to create orchard plots with two levels of a categorical moderator.
plot.two.levels<-function(data,formula,moderator){
model<-run.model(data,formula) # Run the model that will be used for the plot (must be a model without intercept) using the function we just created
orchard_plot(model, mod=moderator,xlab="ARRD")+ # Create an orchard plot
geom_errorbarh(aes(xmin = lowerPR, xmax = upperPR), height = 0, show.legend = FALSE, size = 0.8, alpha = 0.6)+ #prediction intervals
geom_errorbarh(aes(xmin = lowerCL, xmax = upperCL), height = 0.06, show.legend = FALSE, size = 1)+ # confidence intervals
geom_point(aes(fill = name), size = 4, shape = 21)+# size of the mean estimate
scale_size_continuous(range = c(1, 8))+ # size of the bubble points
scale_colour_manual(values = c("purple","seagreen3"))+ #colors
scale_fill_manual(values=c("purple","seagreen3"))+ #colors
theme(text = element_text(size = 20, colour = "black", hjust = 0.5), #font sizes
axis.text.y = element_text(size = 15,colour = "black", hjust = 0.5),
legend.title = element_text(size=16))
}For all subsequent models, we also tested whether the variance of residuals was homogeneous, which is one of the assumption of the models.
Type of outcome: LTL (lower thermal limit), UTL (upper thermal limit), PBT (preferred body temperature)
As mentioned earlier, the sample size of PBT data is rather low relative to the other groups. Therefore, interpretations of these results must be careful.
outcome_model<-run.model(d,~outcome-1) # use the `run.model` function we just created
summary(outcome_model)##
## Multivariate Meta-Analysis Model (k = 239; method: REML)
##
## logLik Deviance AIC BIC AICc
## 205.6350 -411.2699 -399.2699 -378.4869 -398.9031
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0001 0.0086 44 no species_ID no
## sigma^2.2 0.0001 0.0079 44 no genus_species yes
## sigma^2.3 0.0008 0.0280 239 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 236) = 379.3625, p-val < .0001
##
## Test of Moderators (coefficients 1:3):
## QM(df = 3) = 1.1463, p-val = 0.7659
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## outcomeLTL 0.0082 0.0080 1.0208 0.3073 -0.0075 0.0238
## outcomePBT -0.0094 0.0387 -0.2428 0.8081 -0.0852 0.0665
## outcomeUTL 0.0046 0.0079 0.5801 0.5619 -0.0108 0.0199
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
orchard_plot(outcome_model,mod="outcome",xlab="ARRD")+ # plot the results
geom_errorbarh(aes(xmin = lowerPR, xmax = upperPR), height = 0, show.legend = FALSE, size = 0.8, alpha = 0.5)+
geom_errorbarh(aes(xmin = lowerCL, xmax = upperCL), height = 0.06, show.legend = FALSE, size = 1.1)+
geom_point(aes(fill = name), size = 4, shape = 21)+
scale_size_continuous(range = c(1, 8))+
scale_colour_manual(values = c("#00BDD0","#CF78FF","coral2"))+
scale_fill_manual(values=c("#00BDD0","#CF78FF","coral2"))+
theme(text = element_text(size = 20, colour = "black", hjust = 0.5),
axis.text.y = element_text(size = 15,colour = "black", hjust = 0.5),
legend.title = element_text(size=16))qplot(y = sqrt(residuals(outcome_model)^2), x = fitted(outcome_model)) + # plot sqrt(residuals^2) against fitted values
geom_point() +
geom_smooth(method = "lm") + # method ="lm" to generate a straight line
geom_hline(yintercept = 0, colour="red") # assumption of homogeneity of variance seem satisfiedHabitat: aquatic or terrestrial
habitat_model <- run.model(d, ~habitat - 1)
summary(habitat_model)##
## Multivariate Meta-Analysis Model (k = 239; method: REML)
##
## logLik Deviance AIC BIC AICc
## 207.2876 -414.5753 -404.5753 -387.2350 -404.3155
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0001 0.0115 44 no species_ID no
## sigma^2.2 0.0000 0.0000 44 no genus_species yes
## sigma^2.3 0.0008 0.0277 239 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 237) = 379.8879, p-val < .0001
##
## Test of Moderators (coefficients 1:2):
## QM(df = 2) = 2.9737, p-val = 0.2261
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## habitataquatic 0.0017 0.0073 0.2353 0.8140 -0.0125 0.0159
## habitatterrestrial 0.0134 0.0078 1.7083 0.0876 -0.0020 0.0287 .
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot.two.levels(d, ~habitat - 1, "habitat") # We used the plot.two.levels function created earlier qplot(y = sqrt(residuals(habitat_model)^2), x = fitted(habitat_model)) + geom_point() +
geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # assumption of homogeneity of variance seem satisfiedTaxonomic group: vertebrate or invertebrate
taxon_model <- run.model(d, ~taxonomic_group - 1)
summary(taxon_model)##
## Multivariate Meta-Analysis Model (k = 239; method: REML)
##
## logLik Deviance AIC BIC AICc
## 207.2765 -414.5530 -404.5530 -387.2127 -404.2933
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0001 0.0087 44 no species_ID no
## sigma^2.2 0.0000 0.0000 44 no genus_species yes
## sigma^2.3 0.0008 0.0281 239 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 237) = 378.4899, p-val < .0001
##
## Test of Moderators (coefficients 1:2):
## QM(df = 2) = 2.7623, p-val = 0.2513
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## taxonomic_groupinvertebrate 0.0104 0.0063 1.6533 0.0983 -0.0019 0.0228
## taxonomic_groupvertebrate -0.0013 0.0079 -0.1698 0.8652 -0.0167 0.0141
##
## taxonomic_groupinvertebrate .
## taxonomic_groupvertebrate
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot.two.levels(d, ~taxonomic_group - 1, "taxonomic_group")qplot(y = sqrt(residuals(taxon_model)^2), x = fitted(taxon_model)) + geom_point() +
geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # assumption of homogeneity of variance seem satisfiedTaxonomic group subdivided: Fishes, Reptiles and Amphibians, Terrestrial Invertebrates or Aquatic Invertebrates
Similar categories have been used in Morley et al. (2019) Global Ecology and Biogeography
Fishes: 65 effect sizes from 8 studiesReptiles and Amphibians: 45 effect sizes from 12 studiesTerrestrial Invertebrate: 76 effect sizes from 10 studiesAquatic Invertebrates: 51 effect sizes from 6 studiesHere, we provide an finer analysis between taxonomic groups. It seems like we have enough sample size to subdivide vertebrates and invertebrates into these new categories, but probably not enough to subset these categories for each outcome variable. Hence, we will stick to the original categories of taxonomic_group: vertebrates and invertebrates
n.taxa<-d %>% summarise(
`Fishes`=n_distinct(ref[taxonomic_group_sub=="Fishes"]),
`Reptiles and Amphibians`=n_distinct(ref[taxonomic_group_sub=="Reptiles and Amphibians"]),
`Terrestrial Invertebrates`=n_distinct(ref[taxonomic_group_sub=="Terrestrial Invertebrates"]),
`Aquatic Invertebrates`=n_distinct(ref[taxonomic_group_sub=="Aquatic Invertebrates"])) %>% # Calculate the number of distinct studies for each taxonomic group
kable()
taxon_model.sub<-run.model(d,~taxonomic_group_sub-1)
summary(taxon_model.sub)##
## Multivariate Meta-Analysis Model (k = 239; method: REML)
##
## logLik Deviance AIC BIC AICc
## 205.4974 -410.9947 -396.9947 -372.7776 -396.5013
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0001 0.0071 44 no species_ID no
## sigma^2.2 0.0000 0.0000 44 no genus_species yes
## sigma^2.3 0.0008 0.0279 239 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 235) = 372.4469, p-val < .0001
##
## Test of Moderators (coefficients 1:4):
## QM(df = 4) = 5.3967, p-val = 0.2490
##
## Model Results:
##
## estimate se zval pval
## taxonomic_group_subAquatic Invertebrates 0.0100 0.0110 0.9090 0.3633
## taxonomic_group_subFishes -0.0080 0.0082 -0.9740 0.3300
## taxonomic_group_subReptiles and Amphibians 0.0235 0.0175 1.3414 0.1798
## taxonomic_group_subTerrestrial Invertebrates 0.0096 0.0071 1.3500 0.1770
## ci.lb ci.ub
## taxonomic_group_subAquatic Invertebrates -0.0115 0.0315
## taxonomic_group_subFishes -0.0240 0.0081
## taxonomic_group_subReptiles and Amphibians -0.0108 0.0578
## taxonomic_group_subTerrestrial Invertebrates -0.0044 0.0236
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
orchard_plot((run.model(d,~taxonomic_group_sub-1)), mod="taxonomic_group_sub", xlab="Taxonomic group")+
geom_errorbarh(aes(xmin = lowerPR, xmax = upperPR), height = 0, show.legend = FALSE, size = 0.8, alpha = 0.6)+
geom_errorbarh(aes(xmin = lowerCL, xmax = upperCL), height = 0.06, show.legend = FALSE, size = 1.1)+
geom_point(aes(fill = name), size = 4, shape = 21)+
scale_colour_manual(values = c("green4","dodgerblue2","darkcyan","darkgoldenrod3"))+
scale_fill_manual(values=c("green4","dodgerblue2","darkcyan","darkgoldenrod3"))+
scale_size_continuous(range = c(1, 9))+
theme(text = element_text(size = 20, colour = "black", hjust = 0.5),
axis.text.y = element_text(size = 15,colour = "black", hjust = 0.5),
legend.title = element_text(size=16))Origin: wild or lab
Homogeneity of residual variance seem violated between lab and wild animals. We used the robust.rma.mv to correct the estimates, as part of a sensitivity analyses.
origin_model <- run.model(d, ~origin - 1)
summary(origin_model)##
## Multivariate Meta-Analysis Model (k = 235; method: REML)
##
## logLik Deviance AIC BIC AICc
## 207.2416 -414.4832 -404.4832 -387.2280 -404.2188
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0000 0.0034 42 no species_ID no
## sigma^2.2 0.0003 0.0171 42 no genus_species yes
## sigma^2.3 0.0007 0.0259 235 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 233) = 368.8768, p-val < .0001
##
## Test of Moderators (coefficients 1:2):
## QM(df = 2) = 2.9892, p-val = 0.2243
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## originlab -0.0044 0.0130 -0.3401 0.7338 -0.0299 0.0210
## originwild 0.0147 0.0122 1.2097 0.2264 -0.0091 0.0385
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot.two.levels(d, ~origin - 1, "origin")qplot(y = sqrt(residuals(origin_model)^2), x = fitted(origin_model)) + geom_point() +
geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # assumption of homogeneity of variance seem violated. robust.rma.mv(origin_model, cluster = d$species_ID) # robust.rma.mv uses robust sandwich-type estimators to correct for problems such as the heteroscedasticity of residuals##
## Number of outcomes: 235
## Number of clusters: 42
## Outcomes per cluster: 1-30 (mean: 5.60, median: 3)
##
## Test of Moderators (coefficients 1:2):
## F(df1 = 2, df2 = 40) = 0.9223, p-val = 0.4059
##
## Model Results:
##
## estimate se tval pval ci.lb ci.ub
## originlab -0.0044 0.0066 -0.6661 0.5092 -0.0178 0.0090
## originwild 0.0147 0.0114 1.2894 0.2046 -0.0083 0.0377
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Because the variance of wild animals appear to be much greater than the variance of lab animals, we decided to run a post-hoc F-test to test for differences in variances between wild and lab animals.
var.test(d$ARRD[d$origin == "wild"], d$ARRD[d$origin == "lab"]) # F-test##
## F test to compare two variances
##
## data: d$ARRD[d$origin == "wild"] and d$ARRD[d$origin == "lab"]
## F = 8.0113, num df = 163, denom df = 70, p-value < 2.2e-16
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 5.291705 11.745802
## sample estimates:
## ratio of variances
## 8.011254
leveneTest(d$ARRD ~ d$origin) # alternative Levene's Test give similar results## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 1 21.207 6.781e-06 ***
## 233
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot_continuous<-function(data, model, moderator, xlab){
pred<-predict.rma(model)
data %>% mutate(fit=pred$pred,
ci.lb=pred$ci.lb,
ci.ub=pred$ci.ub,
pr.lb=pred$cr.lb,
pr.ub=pred$cr.ub) %>%
ggplot(aes(x = moderator, y = ARRD)) +
geom_ribbon(aes(ymin = pr.lb, ymax = pr.ub, color = NULL), alpha = .1) +
geom_ribbon(aes(ymin = ci.lb, ymax = ci.ub, color = NULL), alpha = .3) +
geom_point(aes(size=(1/sqrt(Var_ARRD))), shape=21, alpha=0.7, fill="sienna1", col="gray25",stroke=1) +
geom_line(aes(y = fit), size = 1.5)+
labs(x = xlab, y = "ARRD", size = "Precison (1/SE)") +
theme_bw() +
scale_size_continuous(range=c(1,12))+
geom_hline(yintercept = 0,linetype = 2, colour = "black",alpha=0.5)+ # horizontal line at lnRR = 0
theme(text = element_text(size = 18, colour = "black", hjust = 0.5), # change font sizes and legend position
legend.text=element_text(size=14),
legend.position=c(0,0),
legend.justification = c(0,0),
legend.background = element_blank(),
legend.direction="horizontal",
legend.title = element_text(size=15),
panel.border=element_rect(colour="black", fill=NA, size=1.2))
}We obtained latitude data for some lab animals. This latitude data corresponds to the latitude at which the animals were collected in the wild prior to be reared in the laboratory.
I plotted the prediction from the model along with confidence intervals (dark grey shading) and prediction intervals (light gray shading)
latitude_model <- run.model(d, ~z_abs_latitude)
summary(latitude_model)##
## Multivariate Meta-Analysis Model (k = 223; method: REML)
##
## logLik Deviance AIC BIC AICc
## 197.0710 -394.1421 -384.1421 -367.1513 -383.8630
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0002 0.0132 39 no species_ID no
## sigma^2.2 0.0000 0.0000 39 no genus_species yes
## sigma^2.3 0.0003 0.0184 223 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 221) = 317.2441, p-val < .0001
##
## Test of Moderators (coefficient 2):
## QM(df = 1) = 0.3790, p-val = 0.5381
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt 0.0100 0.0056 1.7823 0.0747 -0.0010 0.0210 .
## z_abs_latitude 0.0034 0.0056 0.6157 0.5381 -0.0075 0.0143
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
qplot(y = sqrt(residuals(latitude_model)^2), x = fitted(latitude_model)) + geom_point() +
geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # assumption of homogeneity of variance seem satisfied# Generate predictions and plot the results
d.lat <- filter(d, z_abs_latitude != "NA")
plot_continuous(d.lat, latitude_model, d.lat$abs_latitude, "Absolute latitude")Because the influence of latitude on ARRD is mostly relevant in wild animals, I created a data subset without lab animals: d.wild
d.wild <- subset(d, origin == "wild")
latitude_model_wild <- run.model(d.wild, ~z_abs_latitude)
summary(latitude_model_wild)##
## Multivariate Meta-Analysis Model (k = 164; method: REML)
##
## logLik Deviance AIC BIC AICc
## 101.9557 -203.9114 -193.9114 -178.4734 -193.5268
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0002 0.0145 26 no species_ID no
## sigma^2.2 0.0000 0.0000 26 no genus_species yes
## sigma^2.3 0.0017 0.0413 164 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 162) = 246.7804, p-val < .0001
##
## Test of Moderators (coefficient 2):
## QM(df = 1) = 0.3532, p-val = 0.5523
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt 0.0102 0.0092 1.1147 0.2650 -0.0077 0.0282
## z_abs_latitude 0.0049 0.0082 0.5943 0.5523 -0.0112 0.0210
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
qplot(y = sqrt(residuals(latitude_model_wild)^2), x = fitted(latitude_model_wild)) +
geom_point() + geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # assumption of homogeneity of variance seem satisfied# Generate predictions and plot the results
d.lat.wild <- filter(d.wild, z_abs_latitude != "NA")
plot_continuous(d.lat.wild, latitude_model_wild, d.lat.wild$abs_latitude, "Absolute latitude (wild animals)")The sexual size dimorphism index used was MDI: the body mass dimorphism index
The body mass dimorphism index was calculated according to Lovich and Gibbons (1992)
MDI_model <- run.model(d, ~MDI)
summary(MDI_model)##
## Multivariate Meta-Analysis Model (k = 205; method: REML)
##
## logLik Deviance AIC BIC AICc
## 191.4154 -382.8308 -372.8308 -356.2648 -372.5262
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0000 0.0000 40 no species_ID no
## sigma^2.2 0.0000 0.0000 40 no genus_species yes
## sigma^2.3 0.0007 0.0269 205 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 203) = 334.1057, p-val < .0001
##
## Test of Moderators (coefficient 2):
## QM(df = 1) = 4.1861, p-val = 0.0408
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt 0.0053 0.0045 1.1846 0.2362 -0.0035 0.0141
## MDI -0.0123 0.0060 -2.0460 0.0408 -0.0240 -0.0005 *
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
qplot(y = sqrt(residuals(MDI_model)^2), x = fitted(MDI_model)) + geom_point() + geom_smooth(method = "lm") +
geom_hline(yintercept = 0, colour = "red") # assumption of homogeneity of variance seem satisfiedrobust.MDI <- robust.rma.mv(MDI_model, cluster = d$species_ID) # robust estimates
summary(robust.MDI)##
## Number of outcomes: 205
## Number of clusters: 40
## Outcomes per cluster: 1-30 (mean: 5.12, median: 2.5)
##
## Test of Moderators (coefficient 2):
## F(df1 = 1, df2 = 38) = 15.2500, p-val = 0.0004
##
## Model Results:
##
## estimate se tval pval ci.lb ci.ub
## intrcpt 0.0053 0.0038 1.3763 0.1768 -0.0025 0.0131
## MDI -0.0123 0.0031 -3.9051 0.0004 -0.0186 -0.0059 ***
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Generate predictions and plot the results
d.MDI <- filter(d, MDI != "NA")
plot_continuous(d.MDI, MDI_model, d.MDI$MDI, "Body mass dimorphism index") + geom_vline(xintercept = 0,
linetype = 2, alpha = 0.5)duration_model <- run.model(d, ~z_acc_duration)
summary(duration_model)##
## Multivariate Meta-Analysis Model (k = 232; method: REML)
##
## logLik Deviance AIC BIC AICc
## 201.0273 -402.0546 -392.0546 -374.8642 -391.7867
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0002 0.0127 42 no species_ID no
## sigma^2.2 0.0000 0.0000 42 no genus_species yes
## sigma^2.3 0.0008 0.0286 232 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 230) = 378.2431, p-val < .0001
##
## Test of Moderators (coefficient 2):
## QM(df = 1) = 1.9889, p-val = 0.1585
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt 0.0066 0.0057 1.1561 0.2476 -0.0046 0.0177
## z_acc_duration -0.0068 0.0048 -1.4103 0.1585 -0.0162 0.0026
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
qplot(y = sqrt(residuals(duration_model)^2), x = fitted(duration_model)) + geom_point() +
geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # assumption of homogeneity of variance seem violatedrobust.duration <- robust.rma.mv(duration_model, cluster = d$species_ID) # robust estimates
summary(robust.duration)##
## Number of outcomes: 232
## Number of clusters: 42
## Outcomes per cluster: 1-30 (mean: 5.52, median: 2)
##
## Test of Moderators (coefficient 2):
## F(df1 = 1, df2 = 40) = 3.3401, p-val = 0.0751
##
## Model Results:
##
## estimate se tval pval ci.lb ci.ub
## intrcpt 0.0066 0.0055 1.1849 0.2431 -0.0046 0.0177
## z_acc_duration -0.0068 0.0037 -1.8276 0.0751 -0.0143 0.0007 .
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Generate predictions and plot the results
d.duration <- filter(d, acc_duration != "NA")
plot_continuous(d.duration, duration_model, d.duration$acc_duration, "Duration of acclimation (days)")ramping_model <- run.model(d, ~z_ramping.deg.min)
summary(ramping_model)##
## Multivariate Meta-Analysis Model (k = 222; method: REML)
##
## logLik Deviance AIC BIC AICc
## 199.3774 -398.7548 -388.7548 -371.7867 -388.4745
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0000 0.0000 36 no species_ID no
## sigma^2.2 0.0000 0.0070 36 no genus_species yes
## sigma^2.3 0.0007 0.0260 222 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 220) = 342.2747, p-val < .0001
##
## Test of Moderators (coefficient 2):
## QM(df = 1) = 2.1739, p-val = 0.1404
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt 0.0059 0.0064 0.9173 0.3590 -0.0067 0.0185
## z_ramping.deg.min 0.0093 0.0063 1.4744 0.1404 -0.0031 0.0218
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
qplot(y = sqrt(residuals(ramping_model)^2), x = fitted(ramping_model)) + geom_point() +
geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # assumption of homogeneity of variance seem violatedrobust.ramp <- robust.rma.mv(ramping_model, cluster = d$species_ID) # robusts estimates
summary(robust.ramp)##
## Number of outcomes: 222
## Number of clusters: 36
## Outcomes per cluster: 1-30 (mean: 6.17, median: 3.5)
##
## Test of Moderators (coefficient 2):
## F(df1 = 1, df2 = 34) = 1.4545, p-val = 0.2361
##
## Model Results:
##
## estimate se tval pval ci.lb ci.ub
## intrcpt 0.0059 0.0057 1.0439 0.3039 -0.0056 0.0174
## z_ramping.deg.min 0.0093 0.0077 1.2060 0.2361 -0.0064 0.0251
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Generate predictions and plot the results
d.ramping <- filter(d, ramping.deg.min != "NA")
plot_continuous(d.ramping, ramping_model, d.ramping$ramping.deg.min, "Ramping rate (°C/min)")In this section, we aim to answer whether the moderator variables we tested affected differently upper and lower thermal limits (UTL and LTL).
We did not include PBT data in this section because the low sample size (n=13) could increase the chance of type II errors.
PBT data, d.TLd.TL <- subset(d, outcome != "PBT")plot.four.levelsplot.four.levels<-function(data,formula,moderator){
model<-run.model(data,formula) # Run the model that will be used for the plot (must be a model without intercept)
orchard_plot(model, mod=moderator,xlab="ARRD")+ # Create an orchard plot
geom_errorbarh(aes(xmin = lowerPR, xmax = upperPR), height = 0, show.legend = FALSE, size = 0.8, alpha = 0.6)+
geom_errorbarh(aes(xmin = lowerCL, xmax = upperCL), height = 0.1, show.legend = FALSE, size = 1)+
geom_point(aes(fill = name), size = 4.3, shape = 21)+ # mean estimates
scale_size_continuous(range = c(1, 7))+ # data point scaling
scale_colour_manual(values = c("#00BFC4","#00BBD8","coral1","coral2"))+ # colour of the data points
scale_fill_manual(values=c("#00BFC4","#00BBD8","coral1","coral2"))+ # colour of the mean estimates
theme(text = element_text(size = 20, colour = "black", hjust = 0.5),
axis.text.y = element_text(size = 15,colour = "black", hjust = 0.5),
legend.title = element_text(size=16))
}habitat_model.outcome <- run.model(d.TL, ~outcome:habitat - 1)
summary(habitat_model.outcome)##
## Multivariate Meta-Analysis Model (k = 226; method: REML)
##
## logLik Deviance AIC BIC AICc
## 201.9271 -403.8541 -389.8541 -366.0354 -389.3308
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0001 0.0107 38 no species_ID no
## sigma^2.2 0.0000 0.0000 38 no genus_species yes
## sigma^2.3 0.0008 0.0279 226 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 222) = 357.9273, p-val < .0001
##
## Test of Moderators (coefficients 1:4):
## QM(df = 4) = 5.3133, p-val = 0.2566
##
## Model Results:
##
## estimate se zval pval ci.lb
## outcomeLTL:habitataquatic -0.0041 0.0099 -0.4166 0.6770 -0.0234
## outcomeUTL:habitataquatic 0.0048 0.0085 0.5611 0.5747 -0.0119
## outcomeLTL:habitatterrestrial 0.0199 0.0092 2.1610 0.0307 0.0019
## outcomeUTL:habitatterrestrial 0.0059 0.0101 0.5847 0.5588 -0.0138
## ci.ub
## outcomeLTL:habitataquatic 0.0152
## outcomeUTL:habitataquatic 0.0215
## outcomeLTL:habitatterrestrial 0.0379 *
## outcomeUTL:habitatterrestrial 0.0256
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
int.habitat_outcome <- interaction(d.TL$outcome:d.TL$habitat) # create the interaction term manually. If we don't do this step, the labels on the y axis are not displayed correctly
plot.four.levels(d.TL, ~int.habitat_outcome - 1, "int.habitat_outcome") # use the plot.four.levels function we just createdqplot(y = sqrt(residuals(habitat_model.outcome)^2), x = fitted(habitat_model.outcome)) +
geom_point() + geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # homogeneity of residual variance seem satisfiedtaxon_model.outcome <- run.model(d.TL, ~outcome:taxonomic_group - 1)
summary(taxon_model.outcome)##
## Multivariate Meta-Analysis Model (k = 226; method: REML)
##
## logLik Deviance AIC BIC AICc
## 201.1863 -402.3725 -388.3725 -364.5538 -387.8491
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0001 0.0085 38 no species_ID no
## sigma^2.2 0.0000 0.0000 38 no genus_species yes
## sigma^2.3 0.0008 0.0282 226 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 222) = 357.1589, p-val < .0001
##
## Test of Moderators (coefficients 1:4):
## QM(df = 4) = 3.5720, p-val = 0.4670
##
## Model Results:
##
## estimate se zval pval
## outcomeLTL:taxonomic_groupinvertebrate 0.0148 0.0082 1.8167 0.0693
## outcomeUTL:taxonomic_groupinvertebrate 0.0060 0.0080 0.7398 0.4594
## outcomeLTL:taxonomic_groupvertebrate -0.0034 0.0104 -0.3321 0.7398
## outcomeUTL:taxonomic_groupvertebrate 0.0005 0.0100 0.0498 0.9603
## ci.lb ci.ub
## outcomeLTL:taxonomic_groupinvertebrate -0.0012 0.0309 .
## outcomeUTL:taxonomic_groupinvertebrate -0.0098 0.0217
## outcomeLTL:taxonomic_groupvertebrate -0.0238 0.0169
## outcomeUTL:taxonomic_groupvertebrate -0.0190 0.0200
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
int.taxon_outcome <- interaction(d.TL$outcome:d.TL$taxonomic_group)
plot.four.levels(d.TL, ~int.taxon_outcome - 1, "int.taxon_outcome")qplot(y = sqrt(residuals(taxon_model.outcome)^2), x = fitted(taxon_model.outcome)) +
geom_point() + geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # homogeneity of variance seem okorigin_model.outcome <- run.model(d.TL, ~outcome:origin - 1)
summary(origin_model.outcome)##
## Multivariate Meta-Analysis Model (k = 226; method: REML)
##
## logLik Deviance AIC BIC AICc
## 203.9031 -407.8062 -393.8062 -369.9875 -393.2828
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0000 0.0055 38 no species_ID no
## sigma^2.2 0.0003 0.0159 38 no genus_species yes
## sigma^2.3 0.0006 0.0242 226 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 222) = 351.1403, p-val < .0001
##
## Test of Moderators (coefficients 1:4):
## QM(df = 4) = 8.4451, p-val = 0.0766
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## outcomeLTL:originlab 0.0054 0.0133 0.4078 0.6834 -0.0207 0.0316
## outcomeUTL:originlab -0.0131 0.0133 -0.9834 0.3254 -0.0391 0.0130
## outcomeLTL:originwild 0.0068 0.0132 0.5204 0.6028 -0.0189 0.0326
## outcomeUTL:originwild 0.0216 0.0128 1.6926 0.0905 -0.0034 0.0466 .
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
int.origin_outcome <- interaction(d.TL$outcome:d.TL$origin)
plot.four.levels(d.TL, ~int.origin_outcome - 1, "int.origin_outcome")qplot(y = sqrt(residuals(origin_model.outcome)^2), x = fitted(origin_model.outcome)) +
geom_point() + geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # homogeneity of variance seem violatedrobust.rma.mv(origin_model.outcome, cluster = d.TL$species_ID) # robust estimates##
## Number of outcomes: 226
## Number of clusters: 38
## Outcomes per cluster: 1-30 (mean: 5.95, median: 3)
##
## Test of Moderators (coefficients 1:4):
## F(df1 = 4, df2 = 34) = 2.7611, p-val = 0.0433
##
## Model Results:
##
## estimate se tval pval ci.lb ci.ub
## outcomeLTL:originlab 0.0054 0.0064 0.8444 0.4043 -0.0077 0.0185
## outcomeUTL:originlab -0.0131 0.0121 -1.0807 0.2874 -0.0376 0.0115
## outcomeLTL:originwild 0.0068 0.0170 0.4017 0.6904 -0.0278 0.0415
## outcomeUTL:originwild 0.0216 0.0089 2.4203 0.0210 0.0035 0.0397 *
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Here, we also tested whether the variance in ARRD varied between wild and lab animals, as a function of the type of outcome variable using a F-test
var.test(d$ARRD[d.TL$origin == "wild" & d.TL$outcome == "UTL"], d$ARRD[d.TL$origin ==
"lab" & d.TL$outcome == "UTL"]) # F-test for UTL##
## F test to compare two variances
##
## data: d$ARRD[d.TL$origin == "wild" & d.TL$outcome == "UTL"] and d$ARRD[d.TL$origin == "lab" & d.TL$outcome == "UTL"]
## F = 2.1647, num df = 87, denom df = 44, p-value = 0.005684
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 1.260911 3.554507
## sample estimates:
## ratio of variances
## 2.164662
var.test(d$ARRD[d.TL$origin == "wild" & d.TL$outcome == "LTL"], d$ARRD[d.TL$origin ==
"lab" & d.TL$outcome == "LTL"]) # F-test for LTL##
## F test to compare two variances
##
## data: d$ARRD[d.TL$origin == "wild" & d.TL$outcome == "LTL"] and d$ARRD[d.TL$origin == "lab" & d.TL$outcome == "LTL"]
## F = 6.7417, num df = 69, denom df = 35, p-value = 2.553e-08
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 3.659897 11.742324
## sample estimates:
## ratio of variances
## 6.741679
leveneTest(ARRD ~ origin:outcome, data = d.TL) # alternative Levene's Test give similar results## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 3 6.9301 0.0001765 ***
## 222
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
LTL and PBT to generate prediction lines for each outcome variabled.LTL <- subset(d.TL, outcome == "LTL") # data subset on lower thermal limits
d.UTL <- subset(d.TL, outcome == "UTL") # data subset on upper thermal limitsHere, latitude data on wild and laboratory animals are included.
latitude_model.outcome <- run.model(d.TL, ~outcome:z_abs_latitude)
summary(latitude_model.outcome)##
## Multivariate Meta-Analysis Model (k = 214; method: REML)
##
## logLik Deviance AIC BIC AICc
## 194.3090 -388.6180 -376.6180 -356.5068 -376.2062
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0002 0.0151 35 no species_ID no
## sigma^2.2 0.0000 0.0000 35 no genus_species yes
## sigma^2.3 0.0003 0.0174 214 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 211) = 311.3158, p-val < .0001
##
## Test of Moderators (coefficients 2:3):
## QM(df = 2) = 1.9114, p-val = 0.3845
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt 0.0105 0.0059 1.7752 0.0759 -0.0011 0.0222
## outcomeLTL:z_abs_latitude 0.0089 0.0074 1.2070 0.2274 -0.0055 0.0233
## outcomeUTL:z_abs_latitude -0.0048 0.0083 -0.5761 0.5646 -0.0211 0.0115
##
## intrcpt .
## outcomeLTL:z_abs_latitude
## outcomeUTL:z_abs_latitude
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
qplot(y = sqrt(residuals(latitude_model.outcome)^2), x = fitted(latitude_model.outcome)) +
geom_point() + geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # homogeneity of variance seem okWe only represented the confidence intervals (and not the prediction intervals) because the figure becomes unreadable with both intervals.
d.lat.UTL<-subset(d.UTL,abs_latitude!="NA") # create a data subset without NA values on which to add prediction values
d.lat.LTL<-subset(d.LTL,abs_latitude!="NA")# create a data subset without NA values on which to add prediction values
## Prediction: Outcome = UTL
lat_model.UTL<-run.model(d.lat.UTL,~z_abs_latitude) # fit model
pred_lat_model.UTL<- predict.rma(lat_model.UTL) # predict values
d.lat.UTL <- mutate(d.lat.UTL,
ci.lb = pred_lat_model.UTL$ci.lb, # lower bound of the confidence interval for UTL
ci.ub = pred_lat_model.UTL$ci.ub, # upper bound of the confidence interval for UTL
fit = pred_lat_model.UTL$pred) # regression line for UTL
## Prediction: Outcome = LTL
lat_model.LTL<-run.model(d.lat.LTL,~z_abs_latitude)
pred_lat_model.LTL<- predict.rma(lat_model.LTL)
d.lat.LTL <- mutate(d.lat.LTL,
ci.lb = pred_lat_model.LTL$ci.lb, # lower bound of the confidence interval for LTL
ci.ub = pred_lat_model.LTL$ci.ub, # upper bound of the confidence interval for LTL
fit = pred_lat_model.LTL$pred) # regression line for LTL
## Plot
ggplot(d.TL,aes(x = abs_latitude, y = ARRD, fill=outcome)) +
geom_ribbon(data=d.lat.LTL,aes(ymin = ci.lb, ymax = ci.ub, color = NULL), alpha = .3) +
geom_line(data=d.lat.LTL,aes(y = fit), size = 1.5, col="#00BFC4")+
geom_ribbon(data=d.lat.UTL,aes(ymin = ci.lb, ymax = ci.ub, color = NULL), alpha = .3) +
geom_line(data=d.lat.UTL,aes(y = fit), size = 1.5, col="coral2")+
geom_point(aes(size=(1/sqrt(Var_ARRD)), fill=outcome), shape=21, alpha=0.7, col="gray25",stroke=1) +
scale_fill_manual(values=c("#00BFC4", "coral2"))+
labs(x = "Absolute latitude", y = "ARRD", size = "Precison (1/SE)") +
theme_bw() +
scale_size_continuous(range=c(1,12))+
geom_hline(yintercept = 0,linetype = 2, colour = "black",alpha=0.5)+
theme(text = element_text(size = 18, colour = "black", hjust = 0.5),
legend.text=element_text(size=14),
legend.position=c(0,0),
legend.justification = c(0,0),
legend.background = element_blank(),
legend.direction="horizontal",
legend.title = element_text(size=15),
panel.border=element_rect(colour="black", fill=NA, size=1.2))d.TL.wild <- subset(d.TL, origin == "wild")
latitude_model.outcome.wild <- run.model(d.TL.wild, ~outcome:z_abs_latitude)
summary(latitude_model.outcome.wild)##
## Multivariate Meta-Analysis Model (k = 158; method: REML)
##
## logLik Deviance AIC BIC AICc
## 103.3704 -206.7409 -194.7409 -176.4803 -194.1733
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0008 0.0281 24 no species_ID no
## sigma^2.2 0.0000 0.0000 24 no genus_species yes
## sigma^2.3 0.0011 0.0333 158 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 155) = 236.4041, p-val < .0001
##
## Test of Moderators (coefficients 2:3):
## QM(df = 2) = 5.6548, p-val = 0.0592
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt 0.0193 0.0112 1.7244 0.0846 -0.0026 0.0411
## outcomeLTL:z_abs_latitude 0.0208 0.0123 1.6812 0.0927 -0.0034 0.0450
## outcomeUTL:z_abs_latitude -0.0178 0.0125 -1.4307 0.1525 -0.0423 0.0066
##
## intrcpt .
## outcomeLTL:z_abs_latitude .
## outcomeUTL:z_abs_latitude
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
qplot(y = sqrt(residuals(latitude_model.outcome.wild)^2), x = fitted(latitude_model.outcome.wild)) +
geom_point() + geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # homogeneity of variance seem okMDI_model.outcome <- run.model(d.TL, ~outcome:MDI)
summary(MDI_model.outcome)##
## Multivariate Meta-Analysis Model (k = 192; method: REML)
##
## logLik Deviance AIC BIC AICc
## 187.1087 -374.2175 -362.2175 -342.7670 -361.7559
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0000 0.0038 34 no species_ID no
## sigma^2.2 0.0000 0.0000 34 no genus_species yes
## sigma^2.3 0.0007 0.0262 192 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 189) = 315.9016, p-val < .0001
##
## Test of Moderators (coefficients 2:3):
## QM(df = 2) = 4.4347, p-val = 0.1089
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt 0.0065 0.0048 1.3640 0.1726 -0.0029 0.0159
## outcomeLTL:MDI -0.0166 0.0088 -1.8849 0.0594 -0.0339 0.0007 .
## outcomeUTL:MDI -0.0096 0.0077 -1.2553 0.2094 -0.0246 0.0054
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
qplot(y = sqrt(residuals(MDI_model.outcome)^2), x = fitted(MDI_model.outcome)) +
geom_point() + geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # homogeneity of variance seem violatedrobust.rma.mv(MDI_model.outcome, cluster = d.TL$species_ID) # robust estimates##
## Number of outcomes: 192
## Number of clusters: 34
## Outcomes per cluster: 1-30 (mean: 5.65, median: 3)
##
## Test of Moderators (coefficients 2:3):
## F(df1 = 2, df2 = 31) = 6.3970, p-val = 0.0047
##
## Model Results:
##
## estimate se tval pval ci.lb ci.ub
## intrcpt 0.0065 0.0045 1.4544 0.1559 -0.0026 0.0157
## outcomeLTL:MDI -0.0166 0.0091 -1.8249 0.0777 -0.0352 0.0020 .
## outcomeUTL:MDI -0.0096 0.0062 -1.5476 0.1319 -0.0223 0.0031
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
d.MDI.UTL<-subset(d.UTL,MDI!="NA")
d.MDI.LTL<-subset(d.LTL,MDI!="NA")
## Prediction: Outcome = UTL
MDI_model.UTL<-run.model(d.MDI.UTL,~MDI)
pred_MDI_model.UTL<- predict.rma(MDI_model.UTL)
d.MDI.UTL <- mutate(d.MDI.UTL,
ci.lb = pred_MDI_model.UTL$ci.lb,
ci.ub = pred_MDI_model.UTL$ci.ub,
fit = pred_MDI_model.UTL$pred)
## Prediction: Outcome = LTL
MDI_model.LTL<-run.model(d.MDI.LTL,~MDI)
pred_MDI_model.LTL<- predict.rma(MDI_model.LTL)
d.MDI.LTL <- mutate(d.MDI.LTL,
ci.lb = pred_MDI_model.LTL$ci.lb,
ci.ub = pred_MDI_model.LTL$ci.ub,
fit = pred_MDI_model.LTL$pred)
## Plot
ggplot(d.TL,aes(x = MDI, y = ARRD, fill=outcome)) +
geom_ribbon(data=d.MDI.LTL,aes(ymin = ci.lb, ymax = ci.ub, color = NULL), alpha = .3) +
geom_line(data=d.MDI.LTL,aes(y = fit), size = 1.5, col="#00BFC4")+
geom_ribbon(data=d.MDI.UTL,aes(ymin = ci.lb, ymax = ci.ub, color = NULL), alpha = .3) +
geom_line(data=d.MDI.UTL,aes(y = fit), size = 1.5, col="coral2")+
geom_point(aes(size=(1/sqrt(Var_ARRD)), fill=outcome), shape=21, alpha=0.7, col="gray25",stroke=1) +
scale_fill_manual(values=c("#00BFC4", "coral2"))+
labs(x = "Body mass dimorphism index", y = "ARRD", size = "Precison (1/SE)") +
theme_bw() +
scale_size_continuous(range=c(1,12))+
geom_hline(yintercept = 0,linetype = 2, colour = "black",alpha=0.5)+
geom_vline(xintercept = 0,linetype = 2, colour = "black",alpha=0.5)+
theme(text = element_text(size = 18, colour = "black", hjust = 0.5), # change font sizes and legend position
legend.text=element_text(size=14),
legend.position=c(0,0),
legend.justification = c(0,0),
legend.background = element_blank(),
legend.direction="horizontal",
legend.title = element_text(size=15),
panel.border=element_rect(colour="black", fill=NA, size=1.2))duration_model.outcome <- run.model(d.TL, ~outcome:z_acc_duration)
summary(duration_model.outcome)##
## Multivariate Meta-Analysis Model (k = 219; method: REML)
##
## logLik Deviance AIC BIC AICc
## 197.7036 -395.4072 -383.4072 -363.1555 -383.0053
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0002 0.0133 36 no species_ID no
## sigma^2.2 0.0000 0.0022 36 no genus_species yes
## sigma^2.3 0.0007 0.0271 219 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 216) = 353.8016, p-val < .0001
##
## Test of Moderators (coefficients 2:3):
## QM(df = 2) = 4.6523, p-val = 0.0977
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt 0.0073 0.0059 1.2343 0.2171 -0.0043 0.0189
## outcomeLTL:z_acc_duration -0.0117 0.0056 -2.0652 0.0389 -0.0227 -0.0006
## outcomeUTL:z_acc_duration 0.0026 0.0076 0.3380 0.7354 -0.0123 0.0174
##
## intrcpt
## outcomeLTL:z_acc_duration *
## outcomeUTL:z_acc_duration
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
qplot(y = sqrt(residuals(duration_model.outcome)^2), x = fitted(duration_model.outcome)) +
geom_point() + geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # homogeneity of variance seem violatedrobust.rma.mv(duration_model.outcome, cluster = d.TL$species_ID) # robust estimates##
## Number of outcomes: 219
## Number of clusters: 36
## Outcomes per cluster: 1-30 (mean: 6.08, median: 3)
##
## Test of Moderators (coefficients 2:3):
## F(df1 = 2, df2 = 33) = 8.0054, p-val = 0.0015
##
## Model Results:
##
## estimate se tval pval ci.lb ci.ub
## intrcpt 0.0073 0.0058 1.2678 0.2137 -0.0044 0.0190
## outcomeLTL:z_acc_duration -0.0117 0.0030 -3.8987 0.0004 -0.0177 -0.0056
## outcomeUTL:z_acc_duration 0.0026 0.0048 0.5290 0.6003 -0.0073 0.0124
##
## intrcpt
## outcomeLTL:z_acc_duration ***
## outcomeUTL:z_acc_duration
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
d.acc.UTL<-subset(d.UTL,acc_duration!="NA")
d.acc.LTL<-subset(d.LTL,acc_duration!="NA")
## Prediction: Outcome = UTL
acc_model.UTL<-run.model(d.acc.UTL,~z_acc_duration)
pred_acc_model.UTL<- predict.rma(acc_model.UTL)
d.acc.UTL <- mutate(d.acc.UTL,
ci.lb = pred_acc_model.UTL$ci.lb,
ci.ub = pred_acc_model.UTL$ci.ub,
fit = pred_acc_model.UTL$pred)
## Prediction: Outcome = LTL
acc_model.LTL<-run.model(d.acc.LTL,~z_acc_duration)
pred_acc_model.LTL<- predict.rma(acc_model.LTL)
d.acc.LTL <- mutate(d.acc.LTL,
ci.lb = pred_acc_model.LTL$ci.lb,
ci.ub = pred_acc_model.LTL$ci.ub,
fit = pred_acc_model.LTL$pred)
## Plot
ggplot(d.TL,aes(x = acc_duration, y = ARRD, fill=outcome)) +
geom_ribbon(data= d.acc.LTL,aes(ymin = ci.lb, ymax = ci.ub, color = NULL), alpha = .3) +
geom_line(data= d.acc.LTL,aes(y = fit), size = 1.5, col="#00BFC4")+
geom_ribbon(data=d.acc.UTL,aes(ymin = ci.lb, ymax = ci.ub, color = NULL), alpha = .3) +
geom_line(data=d.acc.UTL,aes(y = fit), size = 1.5, col="coral2")+
geom_point(aes(size=(1/sqrt(Var_ARRD)), fill=outcome), shape=21, alpha=0.7, col="gray25",stroke=1) +
scale_fill_manual(values=c("#00BFC4", "coral2"))+
labs(x = "Duration of acclimation (days)", y = "ARRD", size = "Precison (1/SE)") +
theme_bw() +
scale_size_continuous(range=c(1,12))+
geom_hline(yintercept = 0,linetype = 2, colour = "black",alpha=0.5)+ # horizontal line at lnRR = 0
theme(text = element_text(size = 18, colour = "black", hjust = 0.5), # change font sizes and legend position
legend.text=element_text(size=14),
legend.position=c(0,0),
legend.justification = c(0,0),
legend.background = element_blank(),
legend.direction="horizontal",
legend.title = element_text(size=15),
panel.border=element_rect(colour="black", fill=NA, size=1.2))ramping_model.outcome <- run.model(d.TL, ~outcome:z_ramping.deg.min)
summary(ramping_model.outcome)##
## Multivariate Meta-Analysis Model (k = 222; method: REML)
##
## logLik Deviance AIC BIC AICc
## 197.8458 -395.6916 -383.6916 -363.3572 -383.2954
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0000 0.0000 36 no species_ID no
## sigma^2.2 0.0001 0.0072 36 no genus_species yes
## sigma^2.3 0.0007 0.0263 222 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 219) = 342.2022, p-val < .0001
##
## Test of Moderators (coefficients 2:3):
## QM(df = 2) = 2.3673, p-val = 0.3062
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt 0.0062 0.0065 0.9531 0.3405 -0.0066 0.0190
## outcomeLTL:z_ramping.deg.min 0.0127 0.0094 1.3433 0.1792 -0.0058 0.0311
## outcomeUTL:z_ramping.deg.min 0.0075 0.0073 1.0362 0.3001 -0.0067 0.0218
##
## intrcpt
## outcomeLTL:z_ramping.deg.min
## outcomeUTL:z_ramping.deg.min
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
qplot(y = sqrt(residuals(ramping_model.outcome)^2), x = fitted(ramping_model.outcome)) +
geom_point() + geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # homogeneity of variance seem violatedrobust.rma.mv(ramping_model.outcome, cluster = d.TL$species_ID) # robust estimates##
## Number of outcomes: 222
## Number of clusters: 36
## Outcomes per cluster: 1-30 (mean: 6.17, median: 3.5)
##
## Test of Moderators (coefficients 2:3):
## F(df1 = 2, df2 = 33) = 0.7110, p-val = 0.4985
##
## Model Results:
##
## estimate se tval pval ci.lb ci.ub
## intrcpt 0.0062 0.0058 1.0772 0.2892 -0.0055 0.0180
## outcomeLTL:z_ramping.deg.min 0.0127 0.0136 0.9286 0.3599 -0.0151 0.0404
## outcomeUTL:z_ramping.deg.min 0.0075 0.0085 0.8888 0.3805 -0.0097 0.0248
##
## intrcpt
## outcomeLTL:z_ramping.deg.min
## outcomeUTL:z_ramping.deg.min
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
d.ramp.UTL<-subset(d.UTL,ramping.deg.min!="NA")
d.ramp.LTL<-subset(d.LTL,ramping.deg.min!="NA")
## Prediction: Outcome = UTL
ramp_model.UTL<-run.model(d.ramp.UTL,~z_ramping.deg.min)
pred_ramp_model.UTL<- predict.rma(ramp_model.UTL)
d.ramp.UTL <- mutate(d.ramp.UTL,
ci.lb = pred_ramp_model.UTL$ci.lb,
ci.ub = pred_ramp_model.UTL$ci.ub,
fit = pred_ramp_model.UTL$pred)
## Prediction: Outcome = LTL
ramp_model.LTL<-run.model(d.ramp.LTL,~z_ramping.deg.min)
pred_ramp_model.LTL<- predict.rma(ramp_model.LTL)
d.ramp.LTL <- mutate(d.ramp.LTL,
ci.lb = pred_ramp_model.LTL$ci.lb,
ci.ub = pred_ramp_model.LTL$ci.ub,
fit = pred_ramp_model.LTL$pred)
## Plot
ggplot(d.TL,aes(x = ramping.deg.min, y = ARRD, fill=outcome)) +
geom_ribbon(data= d.ramp.LTL,aes(ymin = ci.lb, ymax = ci.ub, color = NULL), alpha = .3) +
geom_line(data= d.ramp.LTL,aes(y = fit), size = 1.5, col="#00BFC4")+
geom_ribbon(data=d.ramp.UTL,aes(ymin = ci.lb, ymax = ci.ub, color = NULL), alpha = .3) +
geom_line(data=d.ramp.UTL,aes(y = fit), size = 1.5, col="coral2")+
geom_point(aes(size=(1/sqrt(Var_ARRD)), fill=outcome), shape=21, alpha=0.7, col="gray25",stroke=1) +
scale_fill_manual(values=c("#00BFC4", "coral2"))+
labs(x = "Ramping rate (°C/min)", y = "ARRD", size = "Precison (1/SE)") +
theme_bw() +
scale_size_continuous(range=c(1,12))+
geom_hline(yintercept = 0,linetype = 2, colour = "black",alpha=0.5)+ # horizontal line at lnRR = 0
theme(text = element_text(size = 18, colour = "black", hjust = 0.5), # change font sizes and legend position
legend.text=element_text(size=14),
legend.position=c(0,0),
legend.justification = c(0,0),
legend.background = element_blank(),
legend.direction="horizontal",
legend.title = element_text(size=15),
panel.border=element_rect(colour="black", fill=NA, size=1.2))The package GGally provides the ggpairs function to test for the correlation between variables
None of the variables tested seem highly collinear (i.e., r > 0.7) but we do have a correlation between MDI and ramping.deg.min of 0.4
d %>%
select(outcome, habitat, taxonomic_group, origin, abs_latitude, MDI, acc_duration, ramping.deg.min) %>% # Correlation between moderators
ggpairs() In the following “full” models, I removed z_ramping.deg.min from the full model because this variable was not significant or marginally significant in any of the models we fitted.
Here, the analysis is on 35 species and 189 effect sizes. We lose a substantial amount of data by incorporating latitude and MDI (see Data Exploration for missing data patterns).
full_model.all.mod <- run.model(d, ~outcome + habitat + taxonomic_group + origin +
z_abs_latitude + MDI + z_acc_duration)
summary(full_model.all.mod) # very reduced sample size##
## Multivariate Meta-Analysis Model (k = 189; method: REML)
##
## logLik Deviance AIC BIC AICc
## 175.1638 -350.3277 -326.3277 -288.0122 -324.4594
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0002 0.0140 35 no species_ID no
## sigma^2.2 0.0000 0.0000 35 no genus_species yes
## sigma^2.3 0.0002 0.0153 189 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 180) = 258.8681, p-val = 0.0001
##
## Test of Moderators (coefficients 2:9):
## QM(df = 8) = 11.3072, p-val = 0.1849
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt -0.0350 0.0230 -1.5251 0.1272 -0.0800 0.0100
## outcomePBT -0.0566 0.0714 -0.7928 0.4279 -0.1965 0.0833
## outcomeUTL 0.0012 0.0068 0.1830 0.8548 -0.0121 0.0146
## habitatterrestrial 0.0389 0.0208 1.8688 0.0617 -0.0019 0.0798
## taxonomic_groupvertebrate 0.0343 0.0212 1.6149 0.1063 -0.0073 0.0759
## originwild 0.0262 0.0241 1.0839 0.2784 -0.0211 0.0735
## z_abs_latitude 0.0066 0.0079 0.8377 0.4022 -0.0089 0.0221
## MDI -0.0171 0.0091 -1.8887 0.0589 -0.0349 0.0006
## z_acc_duration -0.0104 0.0054 -1.9297 0.0536 -0.0209 0.0002
##
## intrcpt
## outcomePBT
## outcomeUTL
## habitatterrestrial .
## taxonomic_groupvertebrate
## originwild
## z_abs_latitude
## MDI .
## z_acc_duration .
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
vif.rma(full_model.all.mod) # No major problems of collinearity (VIF <4)## outcomePBT outcomeUTL habitatterrestrial
## 1.0161 1.0643 3.0413
## taxonomic_groupvertebrate originwild z_abs_latitude
## 2.9468 3.9797 1.8368
## MDI z_acc_duration
## 1.4099 1.4307
6.7% of the latitude data and 14.5% of the MDI data was missing. Therefore, the inclusion of those terms significantly reduces the number of effect sizes analysed, which could generate conflicts with the results of our previous models. All other variables included have <3% of missing data (see Data Exploration for missing data patterns)
Therefore, we fitted a full model without MDI and latitude to make the full model more comparable with our univariate analyses.
This data subset was comprised of 228 effect sizes across 40 species, which is much more inclusive
full_model.red <- run.model(d, ~outcome + taxonomic_group + habitat + origin + z_acc_duration)
summary(full_model.red)##
## Multivariate Meta-Analysis Model (k = 228; method: REML)
##
## logLik Deviance AIC BIC AICc
## 196.6509 -393.3018 -373.3018 -339.3202 -372.2542
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0002 0.0138 40 no species_ID no
## sigma^2.2 0.0000 0.0000 40 no genus_species yes
## sigma^2.3 0.0007 0.0261 228 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 221) = 347.4344, p-val < .0001
##
## Test of Moderators (coefficients 2:7):
## QM(df = 6) = 9.4208, p-val = 0.1513
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt -0.0286 0.0181 -1.5779 0.1146 -0.0641 0.0069
## outcomePBT -0.0575 0.0719 -0.7994 0.4240 -0.1983 0.0834
## outcomeUTL -0.0027 0.0080 -0.3386 0.7349 -0.0183 0.0129
## taxonomic_groupvertebrate 0.0051 0.0144 0.3534 0.7238 -0.0232 0.0334
## habitatterrestrial 0.0354 0.0170 2.0912 0.0365 0.0022 0.0687
## originwild 0.0385 0.0156 2.4724 0.0134 0.0080 0.0690
## z_acc_duration -0.0082 0.0054 -1.5357 0.1246 -0.0187 0.0023
##
## intrcpt
## outcomePBT
## outcomeUTL
## taxonomic_groupvertebrate
## habitatterrestrial *
## originwild *
## z_acc_duration
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
vif.rma(full_model.red) # No collinearity## outcomePBT outcomeUTL taxonomic_groupvertebrate
## 1.0129 1.0283 1.4894
## habitatterrestrial originwild z_acc_duration
## 2.1043 1.8081 1.2733
robust.rma.mv(full_model.red, cluster = d$species_ID)##
## Number of outcomes: 228
## Number of clusters: 40
## Outcomes per cluster: 1-30 (mean: 5.70, median: 2.5)
##
## Test of Moderators (coefficients 2:7):
## F(df1 = 6, df2 = 33) = 1.6952, p-val = 0.1533
##
## Model Results:
##
## estimate se tval pval ci.lb ci.ub
## intrcpt -0.0286 0.0172 -1.6648 0.1054 -0.0636 0.0064
## outcomePBT -0.0575 0.0462 -1.2449 0.2219 -0.1514 0.0364
## outcomeUTL -0.0027 0.0129 -0.2092 0.8356 -0.0289 0.0235
## taxonomic_groupvertebrate 0.0051 0.0156 0.3280 0.7450 -0.0266 0.0368
## habitatterrestrial 0.0354 0.0154 2.3046 0.0276 0.0042 0.0667
## originwild 0.0385 0.0140 2.7406 0.0098 0.0099 0.0670
## z_acc_duration -0.0082 0.0071 -1.1537 0.2569 -0.0227 0.0063
##
## intrcpt
## outcomePBT
## outcomeUTL
## taxonomic_groupvertebrate
## habitatterrestrial *
## originwild **
## z_acc_duration
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Here, we used the same moderator structure as above, where we did not include latitude and MDI because of the extent of missing data in these variables (>5%). We also excluded used the d.TL data set because of the presence of interactions with outcome and the limited sample size of PBT.
This data subset was comprised of 219 effect sizes across 36 studies
full_model.int <- run.model(d.TL, ~outcome + taxonomic_group + habitat + origin +
z_acc_duration + outcome:habitat + outcome:origin + outcome:taxonomic_group +
outcome:z_acc_duration)
summary(full_model.int)##
## Multivariate Meta-Analysis Model (k = 219; method: REML)
##
## logLik Deviance AIC BIC AICc
## 194.9474 -389.8948 -363.8948 -320.4444 -362.0281
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0004 0.0209 36 no species_ID no
## sigma^2.2 0.0000 0.0000 36 no genus_species yes
## sigma^2.3 0.0003 0.0176 219 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 209) = 317.2567, p-val < .0001
##
## Test of Moderators (coefficients 2:10):
## QM(df = 9) = 28.5616, p-val = 0.0008
##
## Model Results:
##
## estimate se zval pval
## intrcpt -0.0310 0.0232 -1.3373 0.1811
## outcomeUTL -0.0508 0.0309 -1.6452 0.0999
## taxonomic_groupvertebrate 0.0245 0.0220 1.1122 0.2660
## habitatterrestrial 0.0394 0.0219 1.7997 0.0719
## originwild 0.0215 0.0209 1.0273 0.3043
## z_acc_duration -0.0148 0.0062 -2.3712 0.0177
## outcomeUTL:habitatterrestrial 0.0575 0.0313 1.8406 0.0657
## outcomeUTL:originwild 0.0782 0.0237 3.2926 0.0010
## outcomeUTL:taxonomic_groupvertebrate -0.0151 0.0263 -0.5741 0.5659
## outcomeUTL:z_acc_duration 0.0259 0.0117 2.2173 0.0266
## ci.lb ci.ub
## intrcpt -0.0764 0.0144
## outcomeUTL -0.1114 0.0097 .
## taxonomic_groupvertebrate -0.0186 0.0676
## habitatterrestrial -0.0035 0.0824 .
## originwild -0.0195 0.0625
## z_acc_duration -0.0270 -0.0026 *
## outcomeUTL:habitatterrestrial -0.0037 0.1188 .
## outcomeUTL:originwild 0.0316 0.1247 ***
## outcomeUTL:taxonomic_groupvertebrate -0.0667 0.0365
## outcomeUTL:z_acc_duration 0.0030 0.0487 *
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
robust.rma.mv(full_model.int, cluster = d.TL$species_ID)##
## Number of outcomes: 219
## Number of clusters: 36
## Outcomes per cluster: 1-30 (mean: 6.08, median: 3)
##
## Test of Moderators (coefficients 2:10):
## F(df1 = 9, df2 = 26) = 12.9164, p-val < .0001
##
## Model Results:
##
## estimate se tval pval
## intrcpt -0.0310 0.0308 -1.0052 0.3241
## outcomeUTL -0.0508 0.0432 -1.1776 0.2496
## taxonomic_groupvertebrate 0.0245 0.0290 0.8442 0.4062
## habitatterrestrial 0.0394 0.0304 1.2989 0.2054
## originwild 0.0215 0.0342 0.6288 0.5350
## z_acc_duration -0.0148 0.0035 -4.2050 0.0003
## outcomeUTL:habitatterrestrial 0.0575 0.0436 1.3208 0.1981
## outcomeUTL:originwild 0.0782 0.0455 1.7171 0.0979
## outcomeUTL:taxonomic_groupvertebrate -0.0151 0.0307 -0.4921 0.6268
## outcomeUTL:z_acc_duration 0.0259 0.0101 2.5500 0.0170
## ci.lb ci.ub
## intrcpt -0.0944 0.0324
## outcomeUTL -0.1396 0.0379
## taxonomic_groupvertebrate -0.0351 0.0840
## habitatterrestrial -0.0230 0.1018
## originwild -0.0488 0.0918
## z_acc_duration -0.0220 -0.0076 ***
## outcomeUTL:habitatterrestrial -0.0320 0.1471
## outcomeUTL:originwild -0.0154 0.1717 .
## outcomeUTL:taxonomic_groupvertebrate -0.0782 0.0480
## outcomeUTL:z_acc_duration 0.0050 0.0467 *
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
We used the MuMin package to generate all possible moderator combinations, determine the importance of the moderators, and generate model-averaged estimates.
eval(metafor:::.MuMIn)
d.noNA <- d[!apply(d[,c("outcome", "taxonomic_group","habitat","origin", "z_acc_duration")], 1, anyNA),] # Remove rows with any NA value on one of these columns
d.noNA.TL<-subset(d.noNA, outcome!="PBT") # need a subset without PBT because we have interactions with outcome
d.noNA.TL<-as.data.frame(d.noNA.TL) # Convert to data frame to calculate the VCV matrix
VCV_ARRD_MuMIn<-make_VCV_matrix(d.noNA.TL, V="Var_ARRD", cluster="shared_measurement_ID", obs="es_ID") # Create a new VCV matrix with this reduced data set
full_model.MuMIn<- rma.mv(yi=ARRD, V=VCV_ARRD_MuMIn,
method="ML", # maximum likelihood for model selection
mods= ~outcome+ # all moderators listed in the full model above
taxonomic_group+
habitat+
origin+
z_acc_duration+
outcome:habitat+
outcome:origin+
outcome:taxonomic_group+
outcome:z_acc_duration,
random=list(~1|species_ID,
~1|genus_species,
~1|es_ID), # all possible random effects
R = list(genus_species = phylo_matrix),
data=d.noNA.TL)
options(na.action = "na.fail") #required for dredge to run
candidate_models<-dredge(full_model.MuMIn) # Generate all possible combinations of moderators
options(na.action = "na.omit") #set back to default
subset(candidate_models, delta<=2) # Display all models within 2 values of AICc## Global model call: rma.mv(yi = ARRD, V = VCV_ARRD_MuMIn, mods = ~outcome + taxonomic_group +
## habitat + origin + z_acc_duration + outcome:habitat + outcome:origin +
## outcome:taxonomic_group + outcome:z_acc_duration, random = list(~1 |
## species_ID, ~1 | genus_species, ~1 | es_ID), data = d.noNA.TL,
## method = "ML", R = list(genus_species = phylo_matrix))
## ---
## Model selection table
## (Int) hbt org otc txn_grp z_acc_drt hbt:otc org:otc otc:z_acc_drt df
## 376 + + + + -0.01163 + + + 11
## 104 + + + + + + 9
## 384 + + + + + -0.01315 + + + 12
## 72 + + + + + 8
## logLik AICc delta weight
## 376 211.920 -400.6 0.00 0.414
## 104 209.036 -399.2 1.35 0.210
## 384 212.286 -399.1 1.51 0.195
## 72 207.802 -398.9 1.65 0.182
## Models ranked by AICc(x)
sw(model.avg(candidate_models, subset=delta<=2))# relative importance (sum of weights) of the moderators## habitat origin outcome origin:outcome habitat:outcome
## Sum of weights: 1.00 1.00 1.00 1.00 0.82
## N containing models: 4 4 4 4 3
## z_acc_duration outcome:z_acc_duration taxonomic_group
## Sum of weights: 0.61 0.61 0.19
## N containing models: 2 2 1
mod.avg<-summary(model.avg(candidate_models, subset=delta<=2)) # Generate model-averaged estimates
mod.avg##
## Call:
## model.avg(object = candidate_models, subset = delta <= 2)
##
## Component model call:
## rma.mv(yi = ARRD, V = VCV_ARRD_MuMIn, mods = ~<4 unique rhs>, random =
## list(~1 | species_ID, ~1 | genus_species, ~1 | es_ID), data =
## d.noNA.TL, method = ML, R = list(genus_species = phylo_matrix))
##
## Component models:
## df logLik AICc delta weight
## 1235678 11 211.92 -400.56 0.00 0.41
## 12367 9 209.04 -399.21 1.35 0.21
## 12345678 12 212.29 -399.06 1.51 0.19
## 1237 8 207.80 -398.92 1.65 0.18
##
## Term codes:
## habitat origin outcome
## 1 2 3
## taxonomic_group z_acc_duration habitat:outcome
## 4 5 6
## origin:outcome outcome:z_acc_duration
## 7 8
##
## Model-averaged coefficients:
## (full average)
## Estimate Std. Error z value Pr(>|z|)
## intrcpt -0.015365 0.017390 0.884 0.37694
## habitatterrestrial 0.028215 0.017233 1.637 0.10157
## originwild 0.016558 0.018276 0.906 0.36494
## outcomeUTL -0.051740 0.024574 2.105 0.03525 *
## z_acc_duration -0.007368 0.007456 0.988 0.32306
## habitatterrestrial:outcomeUTL 0.048052 0.032412 1.483 0.13819
## originwild:outcomeUTL 0.067067 0.025129 2.669 0.00761 **
## outcomeUTL:z_acc_duration 0.014312 0.014067 1.017 0.30898
## taxonomic_groupvertebrate 0.002524 0.008200 0.308 0.75824
##
## (conditional average)
## Estimate Std. Error z value Pr(>|z|)
## intrcpt -0.015365 0.017390 0.884 0.37694
## habitatterrestrial 0.028215 0.017233 1.637 0.10157
## originwild 0.016558 0.018276 0.906 0.36494
## outcomeUTL -0.051740 0.024574 2.105 0.03525 *
## z_acc_duration -0.012114 0.005824 2.080 0.03751 *
## habitatterrestrial:outcomeUTL 0.058716 0.025642 2.290 0.02203 *
## originwild:outcomeUTL 0.067067 0.025129 2.669 0.00761 **
## outcomeUTL:z_acc_duration 0.023530 0.010414 2.259 0.02386 *
## taxonomic_groupvertebrate 0.012969 0.014493 0.895 0.37088
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(mod.avg, full=TRUE) # Generate confidence intervals for the estimates averaged using full-averages procedures## 2.5 % 97.5 %
## intrcpt -0.049448001 0.018718425
## habitatterrestrial -0.005560977 0.061991256
## originwild -0.019262016 0.052377367
## outcomeUTL -0.099903987 -0.003575934
## z_acc_duration -0.021982118 0.007245813
## habitatterrestrial:outcomeUTL -0.015473742 0.111578025
## originwild:outcomeUTL 0.017815532 0.116317821
## outcomeUTL:z_acc_duration -0.013259872 0.041883577
## taxonomic_groupvertebrate -0.013547784 0.018595532
best_model<-run.model(d.TL, ~habitat + # paste model structure of the best model identified
origin +
outcome +
z_acc_duration +
outcome:habitat +
outcome:origin+
outcome:z_acc_duration)
summary(best_model) # summary of the best model identified ##
## Multivariate Meta-Analysis Model (k = 219; method: REML)
##
## logLik Deviance AIC BIC AICc
## 197.5057 -395.0114 -373.0114 -336.1410 -371.6848
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0003 0.0179 36 no species_ID no
## sigma^2.2 0.0000 0.0000 36 no genus_species yes
## sigma^2.3 0.0004 0.0187 219 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 211) = 318.5302, p-val < .0001
##
## Test of Moderators (coefficients 2:8):
## QM(df = 7) = 26.3301, p-val = 0.0004
##
## Model Results:
##
## estimate se zval pval ci.lb
## intrcpt -0.0169 0.0185 -0.9168 0.3593 -0.0531
## habitatterrestrial 0.0286 0.0185 1.5469 0.1219 -0.0076
## originwild 0.0238 0.0197 1.2114 0.2258 -0.0147
## outcomeUTL -0.0587 0.0221 -2.6606 0.0078 -0.1020
## z_acc_duration -0.0123 0.0059 -2.0827 0.0373 -0.0239
## habitatterrestrial:outcomeUTL 0.0638 0.0253 2.5221 0.0117 0.0142
## originwild:outcomeUTL 0.0716 0.0238 3.0161 0.0026 0.0251
## outcomeUTL:z_acc_duration 0.0250 0.0108 2.3104 0.0209 0.0038
## ci.ub
## intrcpt 0.0193
## habitatterrestrial 0.0648
## originwild 0.0624
## outcomeUTL -0.0155 **
## z_acc_duration -0.0007 *
## habitatterrestrial:outcomeUTL 0.1134 *
## originwild:outcomeUTL 0.1182 **
## outcomeUTL:z_acc_duration 0.0462 *
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Assumptions
qplot(y = sqrt(residuals(best_model)^2), x = fitted(best_model)) +
geom_point() +
geom_smooth(method = "lm") +
geom_hline(yintercept = 0, colour="red") # Assumption of residual homogeneity of variance seem violatedrobust.rma.mv(best_model,cluster=d.TL$species_ID) # robust estimates##
## Number of outcomes: 219
## Number of clusters: 36
## Outcomes per cluster: 1-30 (mean: 6.08, median: 3)
##
## Test of Moderators (coefficients 2:8):
## F(df1 = 7, df2 = 28) = 11.2393, p-val < .0001
##
## Model Results:
##
## estimate se tval pval ci.lb
## intrcpt -0.0169 0.0359 -0.4714 0.6410 -0.0905
## habitatterrestrial 0.0286 0.0335 0.8542 0.4003 -0.0400
## originwild 0.0238 0.0363 0.6556 0.5174 -0.0506
## outcomeUTL -0.0587 0.0444 -1.3230 0.1965 -0.1497
## z_acc_duration -0.0123 0.0037 -3.3627 0.0022 -0.0198
## habitatterrestrial:outcomeUTL 0.0638 0.0454 1.4062 0.1707 -0.0292
## originwild:outcomeUTL 0.0716 0.0460 1.5568 0.1308 -0.0226
## outcomeUTL:z_acc_duration 0.0250 0.0082 3.0639 0.0048 0.0083
## ci.ub
## intrcpt 0.0566
## habitatterrestrial 0.0971
## originwild 0.0982
## outcomeUTL 0.0322
## z_acc_duration -0.0048 **
## habitatterrestrial:outcomeUTL 0.1568
## originwild:outcomeUTL 0.1659
## outcomeUTL:z_acc_duration 0.0417 **
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
r2_ml(best_model) # R-squared of the best model (the r2_ml function is part of the orchaRd package)## R2_marginal R2_coditional
## 0.5120823 0.7448837
best_model_n2<-run.model(d.TL, ~habitat + # paste model structure of the second best model
origin +
outcome +
outcome:habitat +
outcome:origin)
summary(best_model_n2)##
## Multivariate Meta-Analysis Model (k = 226; method: REML)
##
## logLik Deviance AIC BIC AICc
## 205.0360 -410.0719 -392.0719 -361.5293 -391.2148
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0002 0.0139 38 no species_ID no
## sigma^2.2 0.0000 0.0000 38 no genus_species yes
## sigma^2.3 0.0004 0.0192 226 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 220) = 325.1693, p-val < .0001
##
## Test of Moderators (coefficients 2:6):
## QM(df = 5) = 20.1951, p-val = 0.0011
##
## Model Results:
##
## estimate se zval pval ci.lb
## intrcpt -0.0055 0.0167 -0.3269 0.7438 -0.0383
## habitatterrestrial 0.0247 0.0173 1.4316 0.1523 -0.0091
## originwild 0.0060 0.0173 0.3469 0.7287 -0.0280
## outcomeUTL -0.0565 0.0215 -2.6249 0.0087 -0.0988
## habitatterrestrial:outcomeUTL 0.0440 0.0227 1.9381 0.0526 -0.0005
## originwild:outcomeUTL 0.0746 0.0230 3.2395 0.0012 0.0295
## ci.ub
## intrcpt 0.0273
## habitatterrestrial 0.0585
## originwild 0.0400
## outcomeUTL -0.0143 **
## habitatterrestrial:outcomeUTL 0.0885 .
## originwild:outcomeUTL 0.1198 **
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
qplot(y = sqrt(residuals(best_model_n2)^2), x = fitted(best_model_n2)) +
geom_point() +
geom_smooth(method = "lm") +
geom_hline(yintercept = 0, colour="red") # Assumption of residual homogeneity of variance seem violatedrobust.rma.mv(best_model_n2,cluster=d.TL$species_ID) # robust estimates##
## Number of outcomes: 226
## Number of clusters: 38
## Outcomes per cluster: 1-30 (mean: 5.95, median: 3)
##
## Test of Moderators (coefficients 2:6):
## F(df1 = 5, df2 = 32) = 6.7469, p-val = 0.0002
##
## Model Results:
##
## estimate se tval pval ci.lb
## intrcpt -0.0055 0.0307 -0.1781 0.8598 -0.0681
## habitatterrestrial 0.0247 0.0305 0.8094 0.4242 -0.0375
## originwild 0.0060 0.0310 0.1938 0.8476 -0.0572
## outcomeUTL -0.0565 0.0453 -1.2473 0.2213 -0.1489
## habitatterrestrial:outcomeUTL 0.0440 0.0457 0.9635 0.3425 -0.0490
## originwild:outcomeUTL 0.0746 0.0459 1.6258 0.1138 -0.0189
## ci.ub
## intrcpt 0.0571
## habitatterrestrial 0.0869
## originwild 0.0692
## outcomeUTL 0.0358
## habitatterrestrial:outcomeUTL 0.1370
## originwild:outcomeUTL 0.1681
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
r2_ml(best_model_n2) # R-squared## R2_marginal R2_coditional
## 0.4417215 0.6346086
best_model_n3<-run.model(d.TL, ~habitat + # paste model structure of the third best model
origin +
outcome +
taxonomic_group +
z_acc_duration +
outcome:habitat +
outcome:origin +
outcome:z_acc_duration)
summary(best_model_n3)##
## Multivariate Meta-Analysis Model (k = 219; method: REML)
##
## logLik Deviance AIC BIC AICc
## 196.4572 -392.9144 -368.9144 -328.7491 -367.3306
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0004 0.0205 36 no species_ID no
## sigma^2.2 0.0000 0.0000 36 no genus_species yes
## sigma^2.3 0.0003 0.0177 219 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 210) = 318.5300, p-val < .0001
##
## Test of Moderators (coefficients 2:9):
## QM(df = 8) = 28.1135, p-val = 0.0005
##
## Model Results:
##
## estimate se zval pval ci.lb
## intrcpt -0.0248 0.0206 -1.2068 0.2275 -0.0651
## habitatterrestrial 0.0339 0.0197 1.7225 0.0850 -0.0047
## originwild 0.0237 0.0204 1.1599 0.2461 -0.0163
## outcomeUTL -0.0631 0.0218 -2.9000 0.0037 -0.1058
## taxonomic_groupvertebrate 0.0157 0.0162 0.9712 0.3315 -0.0160
## z_acc_duration -0.0140 0.0061 -2.2961 0.0217 -0.0260
## habitatterrestrial:outcomeUTL 0.0679 0.0250 2.7191 0.0065 0.0190
## originwild:outcomeUTL 0.0781 0.0238 3.2846 0.0010 0.0315
## outcomeUTL:z_acc_duration 0.0239 0.0112 2.1411 0.0323 0.0020
## ci.ub
## intrcpt 0.0155
## habitatterrestrial 0.0725 .
## originwild 0.0637
## outcomeUTL -0.0205 **
## taxonomic_groupvertebrate 0.0475
## z_acc_duration -0.0021 *
## habitatterrestrial:outcomeUTL 0.1169 **
## originwild:outcomeUTL 0.1247 **
## outcomeUTL:z_acc_duration 0.0458 *
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
qplot(y = sqrt(residuals(best_model_n3)^2), x = fitted(best_model_n3)) +
geom_point() +
geom_smooth(method = "lm") +
geom_hline(yintercept = 0, colour="red") # Assumption of residual homogeneity of variance seem violatedrobust.rma.mv(best_model_n3,cluster=d.TL$species_ID) # robust estimates##
## Number of outcomes: 219
## Number of clusters: 36
## Outcomes per cluster: 1-30 (mean: 6.08, median: 3)
##
## Test of Moderators (coefficients 2:9):
## F(df1 = 8, df2 = 27) = 11.0616, p-val < .0001
##
## Model Results:
##
## estimate se tval pval ci.lb
## intrcpt -0.0248 0.0307 -0.8084 0.4259 -0.0877
## habitatterrestrial 0.0339 0.0299 1.1341 0.2667 -0.0274
## originwild 0.0237 0.0335 0.7066 0.4859 -0.0451
## outcomeUTL -0.0631 0.0440 -1.4352 0.1627 -0.1534
## taxonomic_groupvertebrate 0.0157 0.0204 0.7708 0.4475 -0.0262
## z_acc_duration -0.0140 0.0035 -4.0158 0.0004 -0.0212
## habitatterrestrial:outcomeUTL 0.0679 0.0452 1.5019 0.1447 -0.0249
## originwild:outcomeUTL 0.0781 0.0464 1.6826 0.1040 -0.0171
## outcomeUTL:z_acc_duration 0.0239 0.0093 2.5703 0.0160 0.0048
## ci.ub
## intrcpt 0.0381
## habitatterrestrial 0.0952
## originwild 0.0924
## outcomeUTL 0.0271
## taxonomic_groupvertebrate 0.0577
## z_acc_duration -0.0069 ***
## habitatterrestrial:outcomeUTL 0.1607
## originwild:outcomeUTL 0.1733
## outcomeUTL:z_acc_duration 0.0430 *
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
r2_ml(best_model_n3) # R-squared## R2_marginal R2_coditional
## 0.5658501 0.8142307
best_model_n4 <- run.model(d.TL, ~habitat + origin + outcome + outcome:origin)
summary(best_model_n4)##
## Multivariate Meta-Analysis Model (k = 226; method: REML)
##
## logLik Deviance AIC BIC AICc
## 205.3629 -410.7258 -394.7258 -367.5405 -394.0466
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0001 0.0118 38 no species_ID no
## sigma^2.2 0.0000 0.0000 38 no genus_species yes
## sigma^2.3 0.0005 0.0231 226 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 221) = 336.5205, p-val < .0001
##
## Test of Moderators (coefficients 2:5):
## QM(df = 4) = 14.8825, p-val = 0.0050
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt -0.0209 0.0146 -1.4332 0.1518 -0.0495 0.0077
## habitatterrestrial 0.0408 0.0146 2.7984 0.0051 0.0122 0.0695 **
## originwild 0.0177 0.0160 1.1089 0.2675 -0.0136 0.0491
## outcomeUTL -0.0187 0.0095 -1.9562 0.0504 -0.0374 0.0000 .
## originwild:outcomeUTL 0.0388 0.0148 2.6197 0.0088 0.0098 0.0678 **
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
qplot(y = sqrt(residuals(best_model_n4)^2), x = fitted(best_model_n4)) + geom_point() +
geom_smooth(method = "lm") + geom_hline(yintercept = 0, colour = "red") # Assumption of residual homogeneity of variance seem violatedrobust.rma.mv(best_model_n4, cluster = d.TL$species_ID) # robust estimates##
## Number of outcomes: 226
## Number of clusters: 38
## Outcomes per cluster: 1-30 (mean: 5.95, median: 3)
##
## Test of Moderators (coefficients 2:5):
## F(df1 = 4, df2 = 33) = 7.5165, p-val = 0.0002
##
## Model Results:
##
## estimate se tval pval ci.lb ci.ub
## intrcpt -0.0209 0.0164 -1.2744 0.2114 -0.0543 0.0125
## habitatterrestrial 0.0408 0.0132 3.0981 0.0040 0.0140 0.0677 **
## originwild 0.0177 0.0201 0.8843 0.3829 -0.0231 0.0586
## outcomeUTL -0.0187 0.0145 -1.2880 0.2067 -0.0481 0.0108
## originwild:outcomeUTL 0.0388 0.0177 2.1900 0.0357 0.0028 0.0748 *
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
r2_ml(best_model_n4) # R-squared## R2_marginal R2_coditional
## 0.3246459 0.4642041
Data type: published (reported in the publication) or unpublished (not reported)
data.type_model <- run.model(d, ~data_type - 1)
summary(data.type_model)##
## Multivariate Meta-Analysis Model (k = 239; method: REML)
##
## logLik Deviance AIC BIC AICc
## 207.2339 -414.4678 -404.4678 -387.1275 -404.2080
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0000 0.0000 44 no species_ID no
## sigma^2.2 0.0001 0.0086 44 no genus_species yes
## sigma^2.3 0.0008 0.0279 239 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 237) = 378.0483, p-val < .0001
##
## Test of Moderators (coefficients 1:2):
## QM(df = 2) = 1.5263, p-val = 0.4662
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## data_typepublished 0.0004 0.0072 0.0510 0.9593 -0.0137 0.0144
## data_typeunpublished 0.0107 0.0092 1.1593 0.2464 -0.0074 0.0288
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot.two.levels(d, ~data_type - 1, "data_type")Publication type: peer-reviewed or not peer-reviewed (PhD and MSc dissertations)
peer_model <- run.model(d, ~peer_reviewed - 1)
summary(peer_model)##
## Multivariate Meta-Analysis Model (k = 239; method: REML)
##
## logLik Deviance AIC BIC AICc
## 206.8349 -413.6697 -403.6697 -386.3294 -403.4100
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0001 0.0103 44 no species_ID no
## sigma^2.2 0.0001 0.0080 44 no genus_species yes
## sigma^2.3 0.0008 0.0278 239 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 237) = 382.3276, p-val < .0001
##
## Test of Moderators (coefficients 1:2):
## QM(df = 2) = 0.9145, p-val = 0.6330
##
## Model Results:
##
## estimate se zval pval ci.lb
## peer_reviewednot peer-reviewed 0.0061 0.0125 0.4933 0.6218 -0.0183
## peer_reviewedpeer-reviewed 0.0069 0.0077 0.8972 0.3696 -0.0082
## ci.ub
## peer_reviewednot peer-reviewed 0.0306
## peer_reviewedpeer-reviewed 0.0220
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot.two.levels(d, ~peer_reviewed - 1, "peer_reviewed")We tested for the effect of publication year to identify a potential time lag bias
Because the pub_year was not significantly affecting ARRD we do not need to consider this variable in the analyses
year_model <- run.model(d, ~z_pub_year)
summary(year_model)##
## Multivariate Meta-Analysis Model (k = 239; method: REML)
##
## logLik Deviance AIC BIC AICc
## 207.1098 -414.2196 -404.2196 -386.8793 -403.9599
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0001 0.0087 44 no species_ID no
## sigma^2.2 0.0001 0.0071 44 no genus_species yes
## sigma^2.3 0.0008 0.0282 239 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 237) = 382.9603, p-val < .0001
##
## Test of Moderators (coefficient 2):
## QM(df = 1) = 0.5074, p-val = 0.4763
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt 0.0057 0.0065 0.8702 0.3842 -0.0071 0.0185
## z_pub_year 0.0038 0.0054 0.7123 0.4763 -0.0067 0.0144
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
pred_year_model <- predict.rma(year_model)
d.year <- subset(d, pub_year != "NA")
plot_continuous(d.year, year_model, d.year$pub_year, "Publication year")Because funnel plots analyses assume the heterogeneity to be 0, we performed this analysis with the best model we identified.
funnel(best_model,
yaxis="seinv", # Inverse of standard error (precision) as the y axis
level = c(90, 95, 99), # levels of statistical significance highlighted
shade = c("white", "gray55", "gray75"), # shades for different levels of statistical significance
refline = 0, # reference line at x = 0
legend = TRUE, # display legend
ylab="Precision (1/SE)",
cex.lab=1.5,
digits=1,
xlim=c(-2,2))We performed an Egger’s regression by fitting standard error (sqrt(Var_ARRD)) as a moderator
Egger_reg <- run.model(d, ~sqrt(Var_ARRD)) # standard error = sqrt(Var_ARRD)
summary(Egger_reg)##
## Multivariate Meta-Analysis Model (k = 239; method: REML)
##
## logLik Deviance AIC BIC AICc
## 208.3179 -416.6358 -406.6358 -389.2955 -406.3760
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0000 0.0031 44 no species_ID no
## sigma^2.2 0.0001 0.0092 44 no genus_species yes
## sigma^2.3 0.0008 0.0281 239 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 237) = 382.0780, p-val < .0001
##
## Test of Moderators (coefficient 2):
## QM(df = 1) = 0.4727, p-val = 0.4918
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt 0.0009 0.0084 0.1110 0.9116 -0.0155 0.0174
## sqrt(Var_ARRD) 0.0779 0.1133 0.6875 0.4918 -0.1441 0.2999
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
pred_Egger_reg <- predict.rma(Egger_reg) # to generate regression lines, confidence and prediction intervals
plot_continuous(d, Egger_reg, sqrt(d$Var_ARRD), "Standard error")Egger_reg.best<-run.model(d.TL, ~sqrt(Var_ARRD)+
habitat + # structure of the best model identified
origin +
outcome +
z_acc_duration+
outcome:habitat +
outcome:origin+
outcome:z_acc_duration)
summary(Egger_reg.best)##
## Multivariate Meta-Analysis Model (k = 219; method: REML)
##
## logLik Deviance AIC BIC AICc
## 197.2494 -394.4987 -370.4987 -330.3334 -368.9150
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0004 0.0195 36 no species_ID no
## sigma^2.2 0.0000 0.0000 36 no genus_species yes
## sigma^2.3 0.0003 0.0182 219 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 210) = 317.4596, p-val < .0001
##
## Test of Moderators (coefficients 2:9):
## QM(df = 8) = 27.0551, p-val = 0.0007
##
## Model Results:
##
## estimate se zval pval ci.lb
## intrcpt -0.0149 0.0194 -0.7686 0.4421 -0.0530
## sqrt(Var_ARRD) -0.0805 0.1433 -0.5616 0.5744 -0.3614
## habitatterrestrial 0.0294 0.0189 1.5572 0.1194 -0.0076
## originwild 0.0272 0.0206 1.3194 0.1870 -0.0132
## outcomeUTL -0.0603 0.0219 -2.7563 0.0058 -0.1032
## z_acc_duration -0.0127 0.0060 -2.1383 0.0325 -0.0244
## habitatterrestrial:outcomeUTL 0.0668 0.0252 2.6492 0.0081 0.0174
## originwild:outcomeUTL 0.0733 0.0236 3.1088 0.0019 0.0271
## outcomeUTL:z_acc_duration 0.0259 0.0109 2.3730 0.0176 0.0045
## ci.ub
## intrcpt 0.0231
## sqrt(Var_ARRD) 0.2004
## habitatterrestrial 0.0664
## originwild 0.0676
## outcomeUTL -0.0174 **
## z_acc_duration -0.0011 *
## habitatterrestrial:outcomeUTL 0.1162 **
## originwild:outcomeUTL 0.1196 **
## outcomeUTL:z_acc_duration 0.0474 *
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
robust.rma.mv(Egger_reg.best,cluster=d.TL$species_ID)##
## Number of outcomes: 219
## Number of clusters: 36
## Outcomes per cluster: 1-30 (mean: 6.08, median: 3)
##
## Test of Moderators (coefficients 2:9):
## F(df1 = 8, df2 = 27) = 9.2729, p-val < .0001
##
## Model Results:
##
## estimate se tval pval ci.lb
## intrcpt -0.0149 0.0357 -0.4173 0.6798 -0.0883
## sqrt(Var_ARRD) -0.0805 0.1158 -0.6952 0.4929 -0.3180
## habitatterrestrial 0.0294 0.0331 0.8880 0.3824 -0.0386
## originwild 0.0272 0.0365 0.7450 0.4627 -0.0477
## outcomeUTL -0.0603 0.0442 -1.3640 0.1838 -0.1510
## z_acc_duration -0.0127 0.0036 -3.5098 0.0016 -0.0202
## habitatterrestrial:outcomeUTL 0.0668 0.0454 1.4720 0.1526 -0.0263
## originwild:outcomeUTL 0.0733 0.0459 1.5975 0.1218 -0.0209
## outcomeUTL:z_acc_duration 0.0259 0.0084 3.0776 0.0047 0.0086
## ci.ub
## intrcpt 0.0584
## sqrt(Var_ARRD) 0.1570
## habitatterrestrial 0.0974
## originwild 0.1021
## outcomeUTL 0.0304
## z_acc_duration -0.0053 **
## habitatterrestrial:outcomeUTL 0.1599
## originwild:outcomeUTL 0.1675
## outcomeUTL:z_acc_duration 0.0432 **
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Var_model <- run.model(d, ~Var_ARRD)
summary(Var_model)##
## Multivariate Meta-Analysis Model (k = 239; method: REML)
##
## logLik Deviance AIC BIC AICc
## 208.9114 -417.8227 -407.8227 -390.4824 -407.5630
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0001 0.0073 44 no species_ID no
## sigma^2.2 0.0001 0.0083 44 no genus_species yes
## sigma^2.3 0.0008 0.0279 239 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 237) = 382.8744, p-val < .0001
##
## Test of Moderators (coefficient 2):
## QM(df = 1) = 0.0309, p-val = 0.8605
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## intrcpt 0.0054 0.0070 0.7699 0.4414 -0.0083 0.0190
## Var_ARRD 0.0547 0.3115 0.1757 0.8605 -0.5558 0.6653
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Var_model.best<-run.model(d.TL, ~Var_ARRD+
habitat + # structure of the best model identified
origin +
outcome +
z_acc_duration+
outcome:habitat +
outcome:origin+
outcome:z_acc_duration)
summary(Var_model.best)##
## Multivariate Meta-Analysis Model (k = 219; method: REML)
##
## logLik Deviance AIC BIC AICc
## 197.8325 -395.6650 -371.6650 -331.4997 -370.0812
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0003 0.0180 36 no species_ID no
## sigma^2.2 0.0000 0.0000 36 no genus_species yes
## sigma^2.3 0.0003 0.0187 219 no es_ID no
##
## Test for Residual Heterogeneity:
## QE(df = 210) = 318.3734, p-val < .0001
##
## Test of Moderators (coefficients 2:9):
## QM(df = 8) = 26.3902, p-val = 0.0009
##
## Model Results:
##
## estimate se zval pval ci.lb
## intrcpt -0.0169 0.0185 -0.9111 0.3622 -0.0532
## Var_ARRD -0.0463 0.3600 -0.1286 0.8977 -0.7518
## habitatterrestrial 0.0286 0.0185 1.5455 0.1222 -0.0077
## originwild 0.0241 0.0198 1.2188 0.2229 -0.0146
## outcomeUTL -0.0590 0.0221 -2.6724 0.0075 -0.1023
## z_acc_duration -0.0124 0.0059 -2.0889 0.0367 -0.0240
## habitatterrestrial:outcomeUTL 0.0643 0.0253 2.5351 0.0112 0.0146
## originwild:outcomeUTL 0.0720 0.0238 3.0269 0.0025 0.0254
## outcomeUTL:z_acc_duration 0.0251 0.0108 2.3167 0.0205 0.0039
## ci.ub
## intrcpt 0.0194
## Var_ARRD 0.6593
## habitatterrestrial 0.0649
## originwild 0.0628
## outcomeUTL -0.0157 **
## z_acc_duration -0.0008 *
## habitatterrestrial:outcomeUTL 0.1139 *
## originwild:outcomeUTL 0.1185 **
## outcomeUTL:z_acc_duration 0.0463 *
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
robust.rma.mv(Var_model.best,cluster=d.TL$species_ID)##
## Number of outcomes: 219
## Number of clusters: 36
## Outcomes per cluster: 1-30 (mean: 6.08, median: 3)
##
## Test of Moderators (coefficients 2:9):
## F(df1 = 8, df2 = 27) = 9.5094, p-val < .0001
##
## Model Results:
##
## estimate se tval pval ci.lb
## intrcpt -0.0169 0.0365 -0.4621 0.6477 -0.0918
## Var_ARRD -0.0463 0.2115 -0.2188 0.8284 -0.4803
## habitatterrestrial 0.0286 0.0340 0.8420 0.4072 -0.0411
## originwild 0.0241 0.0369 0.6527 0.5195 -0.0516
## outcomeUTL -0.0590 0.0451 -1.3085 0.2017 -0.1515
## z_acc_duration -0.0124 0.0037 -3.3348 0.0025 -0.0200
## habitatterrestrial:outcomeUTL 0.0643 0.0462 1.3916 0.1754 -0.0305
## originwild:outcomeUTL 0.0720 0.0468 1.5381 0.1357 -0.0240
## outcomeUTL:z_acc_duration 0.0251 0.0083 3.0122 0.0056 0.0080
## ci.ub
## intrcpt 0.0581
## Var_ARRD 0.3878
## habitatterrestrial 0.0983
## originwild 0.0997
## outcomeUTL 0.0335
## z_acc_duration -0.0048 **
## habitatterrestrial:outcomeUTL 0.1590
## originwild:outcomeUTL 0.1679
## outcomeUTL:z_acc_duration 0.0422 **
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
d<-as.data.frame(d) # Only work with a dataframe
VCV_matrix<-list() # will need new VCV matrices because the sample size will be iteratively reduced
Leave1studyout<-list() # create a list that will host the results of each model
for(i in 1:length(levels(d$study_ID))){ # N models = N studies
VCV_matrix[[i]]<-make_VCV_matrix(d[d$study_ID != levels(d$study_ID)[i], ], V="Var_ARRD", cluster="shared_measurement_ID", obs="es_ID") # Create a new VCV matrix for each new model
Leave1studyout[[i]] <- rma.mv(yi = ARRD, V = VCV_matrix[[i]], # Same model structure as all the models we fitted
random=list(~1|species_ID,
~1|genus_species,
~1|es_ID),
R = list(genus_species = phylo_matrix),
method="REML",
data = d[d$study_ID != levels(d$study_ID)[i], ]) # Generate a new model for each new data (iterative removal of one study at a time)
}
# The output is a list so we need to summarise the coefficients of all the models performed
results.Leave1studyout<-as.data.frame(cbind(
sapply(Leave1studyout, function(x) summary(x)$beta), # extract the beta coefficient from all models
sapply(Leave1studyout, function(x) summary(x)$se), # extract the standard error from all models
sapply(Leave1studyout, function(x) summary(x)$zval), # extract the z value from all models
sapply(Leave1studyout, function(x) summary(x)$pval), # extract the p value from all models
sapply(Leave1studyout, function(x) summary(x)$ci.lb), # extract the lower confidence interval for all models
sapply(Leave1studyout, function(x) summary(x)$ci.ub))) # extract the upper confidence interval for all models
colnames(results.Leave1studyout)=c("Estimate", "SE", "zval", "pval", "ci.lb", "ci.ub") # change column names
kable(results.Leave1studyout)%>% kable_styling("striped", position="left") %>% scroll_box(width="100%", height="500px") # Table of the results from all models| Estimate | SE | zval | pval | ci.lb | ci.ub |
|---|---|---|---|---|---|
| 0.0080306 | 0.0092556 | 0.8676472 | 0.3855875 | -0.0101101 | 0.0261713 |
| 0.0052709 | 0.0071667 | 0.7354644 | 0.4620567 | -0.0087756 | 0.0193173 |
| 0.0054298 | 0.0070916 | 0.7656606 | 0.4438783 | -0.0084695 | 0.0193291 |
| 0.0046161 | 0.0070690 | 0.6530044 | 0.5137535 | -0.0092389 | 0.0184711 |
| 0.0067137 | 0.0072478 | 0.9263047 | 0.3542877 | -0.0074918 | 0.0209192 |
| 0.0048080 | 0.0066615 | 0.7217633 | 0.4704400 | -0.0082483 | 0.0178643 |
| 0.0054527 | 0.0070874 | 0.7693469 | 0.4416874 | -0.0084384 | 0.0193437 |
| 0.0055409 | 0.0068885 | 0.8043665 | 0.4211853 | -0.0079604 | 0.0190422 |
| 0.0061384 | 0.0069776 | 0.8797310 | 0.3790050 | -0.0075375 | 0.0198144 |
| 0.0061617 | 0.0068123 | 0.9045010 | 0.3657298 | -0.0071901 | 0.0195136 |
| 0.0045223 | 0.0072981 | 0.6196511 | 0.5354875 | -0.0097817 | 0.0188262 |
| 0.0023465 | 0.0060866 | 0.3855156 | 0.6998554 | -0.0095831 | 0.0142760 |
| 0.0052821 | 0.0073373 | 0.7199067 | 0.4715825 | -0.0090986 | 0.0196629 |
| 0.0049186 | 0.0069233 | 0.7104405 | 0.4774310 | -0.0086508 | 0.0184879 |
| 0.0063041 | 0.0065845 | 0.9574161 | 0.3383573 | -0.0066013 | 0.0192096 |
| 0.0066613 | 0.0074735 | 0.8913164 | 0.3727594 | -0.0079865 | 0.0213090 |
| 0.0053373 | 0.0072329 | 0.7379210 | 0.4605625 | -0.0088389 | 0.0195134 |
| 0.0044828 | 0.0065228 | 0.6872465 | 0.4919274 | -0.0083017 | 0.0172673 |
| 0.0062647 | 0.0071358 | 0.8779296 | 0.3799819 | -0.0077212 | 0.0202506 |
| 0.0032875 | 0.0073974 | 0.4444136 | 0.6567436 | -0.0112112 | 0.0177862 |
| 0.0061955 | 0.0069273 | 0.8943600 | 0.3711293 | -0.0073817 | 0.0197726 |
| 0.0054246 | 0.0070718 | 0.7670769 | 0.4430358 | -0.0084359 | 0.0192851 |
| 0.0043628 | 0.0070497 | 0.6188644 | 0.5360057 | -0.0094544 | 0.0181800 |
| 0.0062202 | 0.0070814 | 0.8783802 | 0.3797374 | -0.0076591 | 0.0200995 |
| 0.0061745 | 0.0067844 | 0.9100954 | 0.3627722 | -0.0071228 | 0.0194717 |
| 0.0049251 | 0.0070798 | 0.6956555 | 0.4866446 | -0.0089510 | 0.0188011 |
| 0.0056818 | 0.0069126 | 0.8219459 | 0.4111077 | -0.0078667 | 0.0192302 |
| 0.0061529 | 0.0074865 | 0.8218676 | 0.4111522 | -0.0085204 | 0.0208262 |
| 0.0060947 | 0.0070200 | 0.8681989 | 0.3852854 | -0.0076642 | 0.0198536 |
| 0.0055954 | 0.0070447 | 0.7942727 | 0.4270367 | -0.0082120 | 0.0194029 |
| 0.0072695 | 0.0066700 | 1.0898880 | 0.2757625 | -0.0058034 | 0.0203424 |
| 0.0057441 | 0.0069308 | 0.8287705 | 0.4072343 | -0.0078401 | 0.0193283 |
| 0.0044940 | 0.0063438 | 0.7084150 | 0.4786876 | -0.0079395 | 0.0169276 |
| 0.0087544 | 0.0052998 | 1.6518420 | 0.0985668 | -0.0016330 | 0.0191417 |
| 0.0107753 | 0.0054621 | 1.9727419 | 0.0485250 | 0.0000698 | 0.0214807 |
| 0.0056328 | 0.0068994 | 0.8164150 | 0.4142628 | -0.0078898 | 0.0191554 |
| 0.0056543 | 0.0068973 | 0.8197947 | 0.4123332 | -0.0078640 | 0.0191727 |
ggplot(results.Leave1studyout, aes(Estimate))+
geom_histogram(fill="darkcyan", col="black",binwidth = 0.0001)+ # Simple plot of the distribution of estimates across the models generated
theme_bw()+
theme(text = element_text(size = 20, colour = "black", hjust = 0.5))results.Leave1studyout %>%
summarise(estimate= mean(Estimate), # calculate the mean coefficients across the models generated
se=mean(SE),
zval=mean(zval),
pval=mean(pval),
ci.lb=mean(ci.lb),
ci.ub=mean(ci.ub)) %>%
kable()%>% kable_styling("striped", position="left") | estimate | se | zval | pval | ci.lb | ci.ub |
|---|---|---|---|---|---|
| 0.0057492 | 0.0069517 | 0.8383279 | 0.4181508 | -0.0078758 | 0.0193742 |
VCV_matrix <- list()
Leave1speciesout <- list()
for (i in 1:length(levels(d$species_ID))) {
VCV_matrix[[i]] <- make_VCV_matrix(d[d$species_ID != levels(d$species_ID)[i],
], V = "Var_ARRD", cluster = "shared_measurement_ID", obs = "es_ID")
Leave1speciesout[[i]] <- rma.mv(yi = ARRD, V = VCV_matrix[[i]], random = list(~1 |
species_ID, ~1 | genus_species, ~1 | es_ID), R = list(genus_species = phylo_matrix),
method = "REML", data = d[d$species_ID != levels(d$species_ID)[i], ]) # Generate a new model for each new data (iterative removal of one species at a time)
}
results.Leave1speciesout <- as.data.frame(cbind(sapply(Leave1speciesout, function(x) summary(x)$beta),
sapply(Leave1speciesout, function(x) summary(x)$se), sapply(Leave1speciesout,
function(x) summary(x)$zval), sapply(Leave1speciesout, function(x) summary(x)$pval),
sapply(Leave1speciesout, function(x) summary(x)$ci.lb), sapply(Leave1speciesout,
function(x) summary(x)$ci.ub)))
colnames(results.Leave1speciesout) = c("Estimate", "SE", "zval", "pval", "ci.lb",
"ci.ub")
kable(results.Leave1speciesout) %>%
kable_styling("striped", position = "left") %>%
scroll_box(width = "100%", height = "500px")| Estimate | SE | zval | pval | ci.lb | ci.ub |
|---|---|---|---|---|---|
| 0.0080306 | 0.0092556 | 0.8676472 | 0.3855875 | -0.0101101 | 0.0261713 |
| 0.0056328 | 0.0068994 | 0.8164150 | 0.4142628 | -0.0078898 | 0.0191554 |
| 0.0056543 | 0.0068973 | 0.8197947 | 0.4123332 | -0.0078640 | 0.0191727 |
| 0.0052709 | 0.0071667 | 0.7354644 | 0.4620567 | -0.0087756 | 0.0193173 |
| 0.0041047 | 0.0073383 | 0.5593540 | 0.5759201 | -0.0102781 | 0.0184875 |
| 0.0070721 | 0.0066830 | 1.0582181 | 0.2899560 | -0.0060264 | 0.0201705 |
| 0.0046161 | 0.0070690 | 0.6530044 | 0.5137535 | -0.0092389 | 0.0184711 |
| 0.0067137 | 0.0072478 | 0.9263047 | 0.3542877 | -0.0074918 | 0.0209192 |
| 0.0048080 | 0.0066615 | 0.7217633 | 0.4704400 | -0.0082483 | 0.0178643 |
| 0.0054527 | 0.0070874 | 0.7693469 | 0.4416874 | -0.0084384 | 0.0193437 |
| 0.0055409 | 0.0068885 | 0.8043665 | 0.4211853 | -0.0079604 | 0.0190422 |
| 0.0023465 | 0.0060866 | 0.3855156 | 0.6998554 | -0.0095831 | 0.0142760 |
| 0.0061384 | 0.0069776 | 0.8797310 | 0.3790050 | -0.0075375 | 0.0198144 |
| 0.0061617 | 0.0068123 | 0.9045010 | 0.3657298 | -0.0071901 | 0.0195136 |
| 0.0045223 | 0.0072981 | 0.6196511 | 0.5354875 | -0.0097817 | 0.0188262 |
| 0.0052821 | 0.0073373 | 0.7199067 | 0.4715825 | -0.0090986 | 0.0196629 |
| 0.0065703 | 0.0074792 | 0.8784742 | 0.3796864 | -0.0080887 | 0.0212293 |
| 0.0047462 | 0.0067005 | 0.7083378 | 0.4787355 | -0.0083865 | 0.0178790 |
| 0.0055993 | 0.0068673 | 0.8153507 | 0.4148716 | -0.0078604 | 0.0190590 |
| 0.0050221 | 0.0067013 | 0.7494222 | 0.4536028 | -0.0081122 | 0.0181564 |
| 0.0063041 | 0.0065845 | 0.9574161 | 0.3383573 | -0.0066013 | 0.0192096 |
| 0.0066613 | 0.0074735 | 0.8913164 | 0.3727594 | -0.0079865 | 0.0213090 |
| 0.0053373 | 0.0072329 | 0.7379210 | 0.4605625 | -0.0088389 | 0.0195134 |
| 0.0047565 | 0.0066206 | 0.7184437 | 0.4724837 | -0.0082196 | 0.0177326 |
| 0.0062647 | 0.0071358 | 0.8779296 | 0.3799819 | -0.0077212 | 0.0202506 |
| 0.0032875 | 0.0073974 | 0.4444136 | 0.6567436 | -0.0112112 | 0.0177862 |
| 0.0054246 | 0.0070718 | 0.7670769 | 0.4430358 | -0.0084359 | 0.0192851 |
| 0.0043628 | 0.0070497 | 0.6188644 | 0.5360057 | -0.0094544 | 0.0181800 |
| 0.0057115 | 0.0068950 | 0.8283612 | 0.4074660 | -0.0078024 | 0.0192254 |
| 0.0060571 | 0.0070732 | 0.8563364 | 0.3918117 | -0.0078062 | 0.0199204 |
| 0.0057153 | 0.0068920 | 0.8292681 | 0.4069527 | -0.0077927 | 0.0192233 |
| 0.0061745 | 0.0067844 | 0.9100954 | 0.3627722 | -0.0071228 | 0.0194717 |
| 0.0062771 | 0.0069620 | 0.9016175 | 0.3672601 | -0.0073682 | 0.0199224 |
| 0.0049251 | 0.0070798 | 0.6956555 | 0.4866446 | -0.0089510 | 0.0188011 |
| 0.0056818 | 0.0069126 | 0.8219459 | 0.4111077 | -0.0078667 | 0.0192302 |
| 0.0063404 | 0.0073506 | 0.8625634 | 0.3883776 | -0.0080666 | 0.0207474 |
| 0.0057254 | 0.0068932 | 0.8305852 | 0.4062080 | -0.0077850 | 0.0192358 |
| 0.0053589 | 0.0070610 | 0.7589395 | 0.4478888 | -0.0084805 | 0.0191983 |
| 0.0072695 | 0.0066700 | 1.0898880 | 0.2757625 | -0.0058034 | 0.0203424 |
| 0.0056788 | 0.0069076 | 0.8221132 | 0.4110125 | -0.0078598 | 0.0192174 |
| 0.0049944 | 0.0065586 | 0.7615024 | 0.4463570 | -0.0078602 | 0.0178490 |
| 0.0053309 | 0.0066512 | 0.8014919 | 0.4228470 | -0.0077053 | 0.0183671 |
| 0.0087544 | 0.0052998 | 1.6518420 | 0.0985668 | -0.0016330 | 0.0191417 |
| 0.0105997 | 0.0054653 | 1.9394678 | 0.0524444 | -0.0001120 | 0.0213114 |
ggplot(results.Leave1speciesout, aes(Estimate)) + geom_histogram(fill = "darkcyan",
col = "black", binwidth = 1e-04) + theme_bw() + theme(text = element_text(size = 20,
colour = "black", hjust = 0.5))results.Leave1speciesout %>%
summarise(estimate = mean(Estimate), se = mean(SE), zval = mean(zval), pval = mean(pval),
ci.lb = mean(ci.lb), ci.ub = mean(ci.ub)) %>%
kable() %>%
kable_styling("striped", position = "left")| estimate | se | zval | pval | ci.lb | ci.ub |
|---|---|---|---|---|---|
| 0.0057336 | 0.0069427 | 0.8356278 | 0.4173508 | -0.0078738 | 0.019341 |
VCV_matrix <- list()
Leave1effectout <- list()
for (i in 1:length(levels(d$es_ID))) {
VCV_matrix[[i]] <- make_VCV_matrix(d[d$es_ID != levels(d$es_ID)[i], ], V = "Var_ARRD",
cluster = "shared_measurement_ID", obs = "es_ID")
Leave1effectout[[i]] <- rma.mv(yi = ARRD, V = VCV_matrix[[i]], random = list(~1 |
species_ID, ~1 | genus_species, ~1 | es_ID), R = list(genus_species = phylo_matrix),
method = "REML", data = d[d$es_ID != levels(d$es_ID)[i], ])
}
results.Leave1effectout <- as.data.frame(cbind(sapply(Leave1effectout, function(x) summary(x)$beta),
sapply(Leave1effectout, function(x) summary(x)$se), sapply(Leave1effectout, function(x) summary(x)$zval),
sapply(Leave1effectout, function(x) summary(x)$pval), sapply(Leave1effectout,
function(x) summary(x)$ci.lb), sapply(Leave1effectout, function(x) summary(x)$ci.ub)))
colnames(results.Leave1effectout) = c("Estimate", "SE", "zval", "pval", "ci.lb",
"ci.ub")
kable(results.Leave1effectout) %>%
kable_styling("striped", position = "left") %>%
scroll_box(width = "100%", height = "500px")| Estimate | SE | zval | pval | ci.lb | ci.ub |
|---|---|---|---|---|---|
| 0.0054737 | 0.0069434 | 0.7883189 | 0.4305102 | -0.0081353 | 0.0190826 |
| 0.0054214 | 0.0069978 | 0.7747333 | 0.4384972 | -0.0082940 | 0.0191368 |
| 0.0065632 | 0.0070632 | 0.9292116 | 0.3527794 | -0.0072805 | 0.0204070 |
| 0.0054647 | 0.0068693 | 0.7955223 | 0.4263098 | -0.0079989 | 0.0189283 |
| 0.0063437 | 0.0070266 | 0.9028092 | 0.3666272 | -0.0074282 | 0.0201155 |
| 0.0051634 | 0.0068185 | 0.7572592 | 0.4488946 | -0.0082007 | 0.0185274 |
| 0.0047288 | 0.0067498 | 0.7005846 | 0.4835623 | -0.0085005 | 0.0179581 |
| 0.0062664 | 0.0070135 | 0.8934730 | 0.3716039 | -0.0074798 | 0.0200125 |
| 0.0042357 | 0.0066858 | 0.6335308 | 0.5263871 | -0.0088683 | 0.0173396 |
| 0.0064678 | 0.0070476 | 0.9177292 | 0.3587607 | -0.0073452 | 0.0202808 |
| 0.0049550 | 0.0067800 | 0.7308382 | 0.4648780 | -0.0083334 | 0.0182435 |
| 0.0060580 | 0.0069813 | 0.8677445 | 0.3855342 | -0.0076251 | 0.0197411 |
| 0.0054431 | 0.0069747 | 0.7804046 | 0.4351527 | -0.0082271 | 0.0191132 |
| 0.0061333 | 0.0069913 | 0.8772837 | 0.3803326 | -0.0075693 | 0.0198360 |
| 0.0063116 | 0.0070259 | 0.8983389 | 0.3690049 | -0.0074589 | 0.0200822 |
| 0.0060067 | 0.0069654 | 0.8623577 | 0.3884907 | -0.0076453 | 0.0196587 |
| 0.0055409 | 0.0068885 | 0.8043665 | 0.4211853 | -0.0079604 | 0.0190422 |
| 0.0056899 | 0.0069057 | 0.8239513 | 0.4099672 | -0.0078449 | 0.0192248 |
| 0.0056847 | 0.0069053 | 0.8232345 | 0.4103746 | -0.0078495 | 0.0192188 |
| 0.0056371 | 0.0068957 | 0.8174862 | 0.4136506 | -0.0078782 | 0.0191524 |
| 0.0057727 | 0.0069212 | 0.8340586 | 0.4042479 | -0.0077926 | 0.0193380 |
| 0.0057877 | 0.0069239 | 0.8358978 | 0.4032124 | -0.0077829 | 0.0193582 |
| 0.0056288 | 0.0068947 | 0.8164070 | 0.4142674 | -0.0078844 | 0.0191421 |
| 0.0055458 | 0.0068898 | 0.8049229 | 0.4208642 | -0.0079580 | 0.0190496 |
| 0.0055694 | 0.0068820 | 0.8092650 | 0.4183627 | -0.0079191 | 0.0190578 |
| 0.0055816 | 0.0068849 | 0.8106935 | 0.4175417 | -0.0079126 | 0.0190758 |
| 0.0057275 | 0.0069131 | 0.8285080 | 0.4073829 | -0.0078218 | 0.0192769 |
| 0.0057699 | 0.0069172 | 0.8341453 | 0.4041991 | -0.0077875 | 0.0193274 |
| 0.0057143 | 0.0069107 | 0.8268837 | 0.4083030 | -0.0078304 | 0.0192591 |
| 0.0056347 | 0.0068933 | 0.8174112 | 0.4136935 | -0.0078760 | 0.0191454 |
| 0.0055750 | 0.0068838 | 0.8098713 | 0.4180141 | -0.0079170 | 0.0190671 |
| 0.0057357 | 0.0069134 | 0.8296495 | 0.4067370 | -0.0078143 | 0.0192856 |
| 0.0055842 | 0.0068857 | 0.8109847 | 0.4173745 | -0.0079116 | 0.0190800 |
| 0.0057185 | 0.0069093 | 0.8276572 | 0.4078647 | -0.0078235 | 0.0192605 |
| 0.0054562 | 0.0069630 | 0.7836043 | 0.4332723 | -0.0081910 | 0.0191034 |
| 0.0055758 | 0.0069166 | 0.8061421 | 0.4201609 | -0.0079805 | 0.0191321 |
| 0.0057521 | 0.0068740 | 0.8367817 | 0.4027153 | -0.0077208 | 0.0192249 |
| 0.0062440 | 0.0067744 | 0.9217101 | 0.3566798 | -0.0070335 | 0.0195215 |
| 0.0057340 | 0.0068789 | 0.8335611 | 0.4045284 | -0.0077484 | 0.0192163 |
| 0.0056869 | 0.0068887 | 0.8255497 | 0.4090596 | -0.0078146 | 0.0191885 |
| 0.0055906 | 0.0069165 | 0.8083058 | 0.4189146 | -0.0079654 | 0.0191466 |
| 0.0056732 | 0.0068933 | 0.8230049 | 0.4105052 | -0.0078374 | 0.0191839 |
| 0.0056334 | 0.0069023 | 0.8161629 | 0.4144070 | -0.0078949 | 0.0191618 |
| 0.0057017 | 0.0068860 | 0.8280146 | 0.4076622 | -0.0077946 | 0.0191979 |
| 0.0056645 | 0.0068938 | 0.8216821 | 0.4112578 | -0.0078471 | 0.0191762 |
| 0.0056174 | 0.0068414 | 0.8210918 | 0.4115940 | -0.0077915 | 0.0190264 |
| 0.0056492 | 0.0068968 | 0.8191052 | 0.4127264 | -0.0078682 | 0.0191666 |
| 0.0057509 | 0.0068780 | 0.8361289 | 0.4030824 | -0.0077298 | 0.0192316 |
| 0.0055309 | 0.0069297 | 0.7981435 | 0.4247872 | -0.0080511 | 0.0191130 |
| 0.0056149 | 0.0069062 | 0.8130244 | 0.4162040 | -0.0079210 | 0.0191508 |
| 0.0056278 | 0.0069031 | 0.8152574 | 0.4149250 | -0.0079021 | 0.0191577 |
| 0.0056541 | 0.0068963 | 0.8198762 | 0.4122867 | -0.0078623 | 0.0191705 |
| 0.0056459 | 0.0068980 | 0.8184880 | 0.4130786 | -0.0078739 | 0.0191658 |
| 0.0056345 | 0.0069015 | 0.8164272 | 0.4142558 | -0.0078921 | 0.0191612 |
| 0.0054508 | 0.0069545 | 0.7837697 | 0.4331752 | -0.0081799 | 0.0190814 |
| 0.0043431 | 0.0071975 | 0.6034117 | 0.5462349 | -0.0097638 | 0.0184499 |
| 0.0055963 | 0.0068432 | 0.8177929 | 0.4134754 | -0.0078161 | 0.0190087 |
| 0.0060281 | 0.0068773 | 0.8765117 | 0.3807519 | -0.0074513 | 0.0195074 |
| 0.0057779 | 0.0069137 | 0.8357092 | 0.4033185 | -0.0077728 | 0.0193285 |
| 0.0056950 | 0.0068767 | 0.8281545 | 0.4075830 | -0.0077831 | 0.0191730 |
| 0.0062603 | 0.0066256 | 0.9448654 | 0.3447276 | -0.0067257 | 0.0192464 |
| 0.0052866 | 0.0070943 | 0.7451876 | 0.4561583 | -0.0086180 | 0.0191913 |
| 0.0054965 | 0.0069793 | 0.7875480 | 0.4309612 | -0.0081826 | 0.0191756 |
| 0.0061144 | 0.0066836 | 0.9148296 | 0.3602811 | -0.0069853 | 0.0192140 |
| 0.0057616 | 0.0068418 | 0.8421084 | 0.3997273 | -0.0076482 | 0.0191714 |
| 0.0057740 | 0.0068470 | 0.8432914 | 0.3990655 | -0.0076459 | 0.0191939 |
| 0.0059698 | 0.0067588 | 0.8832629 | 0.3770943 | -0.0072772 | 0.0192168 |
| 0.0056128 | 0.0068453 | 0.8199437 | 0.4122482 | -0.0078038 | 0.0190294 |
| 0.0052967 | 0.0070963 | 0.7464042 | 0.4554233 | -0.0086118 | 0.0192052 |
| 0.0058565 | 0.0068161 | 0.8592147 | 0.3902221 | -0.0075028 | 0.0192158 |
| 0.0055670 | 0.0069403 | 0.8021303 | 0.4224776 | -0.0080357 | 0.0191697 |
| 0.0057932 | 0.0068271 | 0.8485536 | 0.3961297 | -0.0075878 | 0.0191742 |
| 0.0056904 | 0.0068781 | 0.8273213 | 0.4080550 | -0.0077904 | 0.0191712 |
| 0.0053823 | 0.0070466 | 0.7638207 | 0.4449741 | -0.0084287 | 0.0191934 |
| 0.0047090 | 0.0075261 | 0.6256905 | 0.5315180 | -0.0100419 | 0.0194600 |
| 0.0057182 | 0.0068697 | 0.8323740 | 0.4051979 | -0.0077462 | 0.0191826 |
| 0.0056691 | 0.0068875 | 0.8230995 | 0.4104514 | -0.0078301 | 0.0191682 |
| 0.0057325 | 0.0069689 | 0.8225856 | 0.4107437 | -0.0079262 | 0.0193912 |
| 0.0054330 | 0.0069814 | 0.7782125 | 0.4364438 | -0.0082503 | 0.0191164 |
| 0.0064490 | 0.0074284 | 0.8681564 | 0.3853087 | -0.0081103 | 0.0210083 |
| 0.0056400 | 0.0068480 | 0.8235958 | 0.4101693 | -0.0077819 | 0.0190619 |
| 0.0056766 | 0.0069214 | 0.8201542 | 0.4121282 | -0.0078891 | 0.0192423 |
| 0.0056242 | 0.0068682 | 0.8188860 | 0.4128515 | -0.0078371 | 0.0190856 |
| 0.0054580 | 0.0068534 | 0.7963931 | 0.4258036 | -0.0079744 | 0.0188904 |
| 0.0046897 | 0.0066620 | 0.7039553 | 0.4814606 | -0.0083675 | 0.0177470 |
| 0.0059989 | 0.0070027 | 0.8566528 | 0.3916368 | -0.0077262 | 0.0197240 |
| 0.0053399 | 0.0067448 | 0.7917121 | 0.4285285 | -0.0078796 | 0.0185594 |
| 0.0059590 | 0.0070317 | 0.8474502 | 0.3967442 | -0.0078229 | 0.0197410 |
| 0.0059918 | 0.0070060 | 0.8552439 | 0.3924161 | -0.0077396 | 0.0197232 |
| 0.0055156 | 0.0069024 | 0.7990846 | 0.4242414 | -0.0080128 | 0.0190439 |
| 0.0054984 | 0.0068541 | 0.8022075 | 0.4224329 | -0.0079354 | 0.0189322 |
| 0.0055797 | 0.0068875 | 0.8101172 | 0.4178728 | -0.0079196 | 0.0190789 |
| 0.0050027 | 0.0066827 | 0.7486056 | 0.4540950 | -0.0080952 | 0.0181006 |
| 0.0055822 | 0.0068788 | 0.8115101 | 0.4170728 | -0.0079000 | 0.0190644 |
| 0.0058641 | 0.0068178 | 0.8601234 | 0.3897210 | -0.0074985 | 0.0192267 |
| 0.0060169 | 0.0066863 | 0.8998815 | 0.3681833 | -0.0070880 | 0.0191217 |
| 0.0068523 | 0.0075673 | 0.9055122 | 0.3651941 | -0.0079794 | 0.0216840 |
| 0.0055965 | 0.0068260 | 0.8198813 | 0.4122838 | -0.0077822 | 0.0189752 |
| 0.0056224 | 0.0068923 | 0.8157514 | 0.4146423 | -0.0078862 | 0.0191310 |
| 0.0054189 | 0.0069594 | 0.7786457 | 0.4361884 | -0.0082213 | 0.0190591 |
| 0.0054889 | 0.0069219 | 0.7929650 | 0.4277982 | -0.0080779 | 0.0190556 |
| 0.0053698 | 0.0069652 | 0.7709478 | 0.4407379 | -0.0082817 | 0.0190212 |
| 0.0061723 | 0.0068020 | 0.9074336 | 0.3641775 | -0.0071593 | 0.0195039 |
| 0.0054943 | 0.0069244 | 0.7934632 | 0.4275080 | -0.0080773 | 0.0190659 |
| 0.0054574 | 0.0069529 | 0.7849133 | 0.4325044 | -0.0081700 | 0.0190849 |
| 0.0052308 | 0.0070428 | 0.7427115 | 0.4576564 | -0.0085729 | 0.0190344 |
| 0.0058092 | 0.0068964 | 0.8423504 | 0.3995919 | -0.0077075 | 0.0193259 |
| 0.0065199 | 0.0067356 | 0.9679771 | 0.3330558 | -0.0066816 | 0.0197214 |
| 0.0056268 | 0.0068928 | 0.8163295 | 0.4143117 | -0.0078828 | 0.0191364 |
| 0.0044949 | 0.0065273 | 0.6886319 | 0.4910550 | -0.0082984 | 0.0172882 |
| 0.0065139 | 0.0072269 | 0.9013324 | 0.3674116 | -0.0076506 | 0.0206783 |
| 0.0056522 | 0.0068191 | 0.8288869 | 0.4071684 | -0.0077129 | 0.0190174 |
| 0.0057507 | 0.0067735 | 0.8489933 | 0.3958850 | -0.0075252 | 0.0190265 |
| 0.0055086 | 0.0068156 | 0.8082263 | 0.4189603 | -0.0078498 | 0.0188669 |
| 0.0032875 | 0.0073974 | 0.4444136 | 0.6567436 | -0.0112112 | 0.0177862 |
| 0.0073081 | 0.0074263 | 0.9840822 | 0.3250751 | -0.0072472 | 0.0218635 |
| 0.0057608 | 0.0069172 | 0.8328309 | 0.4049401 | -0.0077966 | 0.0193182 |
| 0.0049228 | 0.0063984 | 0.7693778 | 0.4416691 | -0.0076179 | 0.0174635 |
| 0.0054246 | 0.0070718 | 0.7670769 | 0.4430358 | -0.0084359 | 0.0192851 |
| 0.0043509 | 0.0070501 | 0.6171450 | 0.5371391 | -0.0094669 | 0.0181688 |
| 0.0053953 | 0.0069305 | 0.7784896 | 0.4362804 | -0.0081882 | 0.0189789 |
| 0.0056113 | 0.0068564 | 0.8184050 | 0.4131260 | -0.0078270 | 0.0190497 |
| 0.0057476 | 0.0069351 | 0.8287674 | 0.4072360 | -0.0078450 | 0.0193402 |
| 0.0021176 | 0.0060148 | 0.3520692 | 0.7247864 | -0.0096712 | 0.0139064 |
| 0.0059932 | 0.0070507 | 0.8500149 | 0.3953168 | -0.0078259 | 0.0198124 |
| 0.0056967 | 0.0069173 | 0.8235481 | 0.4101964 | -0.0078609 | 0.0192543 |
| 0.0057736 | 0.0069243 | 0.8338165 | 0.4043844 | -0.0077978 | 0.0193450 |
| 0.0055900 | 0.0068670 | 0.8140390 | 0.4156226 | -0.0078690 | 0.0190490 |
| 0.0059531 | 0.0068305 | 0.8715389 | 0.3834600 | -0.0074345 | 0.0193406 |
| 0.0058436 | 0.0068561 | 0.8523117 | 0.3940411 | -0.0075942 | 0.0192813 |
| 0.0049251 | 0.0070798 | 0.6956555 | 0.4866446 | -0.0089510 | 0.0188011 |
| 0.0056599 | 0.0069035 | 0.8198599 | 0.4122960 | -0.0078708 | 0.0191906 |
| 0.0056594 | 0.0069034 | 0.8197901 | 0.4123358 | -0.0078711 | 0.0191899 |
| 0.0056559 | 0.0069020 | 0.8194551 | 0.4125268 | -0.0078718 | 0.0191835 |
| 0.0062487 | 0.0071197 | 0.8776653 | 0.3801254 | -0.0077056 | 0.0202031 |
| 0.0056272 | 0.0068789 | 0.8180315 | 0.4133392 | -0.0078553 | 0.0191097 |
| 0.0058558 | 0.0070501 | 0.8305994 | 0.4062000 | -0.0079621 | 0.0196737 |
| 0.0059001 | 0.0070826 | 0.8330504 | 0.4048163 | -0.0079814 | 0.0197817 |
| 0.0057795 | 0.0069979 | 0.8258924 | 0.4088651 | -0.0079361 | 0.0194950 |
| 0.0057483 | 0.0069410 | 0.8281665 | 0.4075762 | -0.0078559 | 0.0193525 |
| 0.0053133 | 0.0067422 | 0.7880651 | 0.4306586 | -0.0079012 | 0.0185279 |
| 0.0065023 | 0.0072364 | 0.8985564 | 0.3688890 | -0.0076808 | 0.0206854 |
| 0.0057274 | 0.0069326 | 0.8261425 | 0.4087232 | -0.0078604 | 0.0193151 |
| 0.0060446 | 0.0070628 | 0.8558362 | 0.3920884 | -0.0077982 | 0.0198873 |
| 0.0049976 | 0.0065455 | 0.7635129 | 0.4451576 | -0.0078314 | 0.0178265 |
| 0.0051142 | 0.0069385 | 0.7370804 | 0.4610735 | -0.0084849 | 0.0187133 |
| 0.0044022 | 0.0070384 | 0.6254518 | 0.5316746 | -0.0093928 | 0.0181971 |
| 0.0073144 | 0.0067626 | 1.0816065 | 0.2794274 | -0.0059400 | 0.0205689 |
| 0.0063198 | 0.0068596 | 0.9213056 | 0.3568909 | -0.0071247 | 0.0197643 |
| 0.0048269 | 0.0069704 | 0.6924790 | 0.4886366 | -0.0088349 | 0.0184887 |
| 0.0063839 | 0.0068544 | 0.9313460 | 0.3516746 | -0.0070506 | 0.0198183 |
| 0.0055652 | 0.0068753 | 0.8094450 | 0.4182592 | -0.0079101 | 0.0190405 |
| 0.0061870 | 0.0070432 | 0.8784307 | 0.3797100 | -0.0076175 | 0.0199914 |
| 0.0055954 | 0.0070447 | 0.7942727 | 0.4270367 | -0.0082120 | 0.0194029 |
| 0.0064796 | 0.0067674 | 0.9574725 | 0.3383288 | -0.0067843 | 0.0197435 |
| 0.0057120 | 0.0069212 | 0.8252818 | 0.4092116 | -0.0078534 | 0.0192773 |
| 0.0061372 | 0.0068506 | 0.8958601 | 0.3703275 | -0.0072898 | 0.0195642 |
| 0.0056788 | 0.0069076 | 0.8221132 | 0.4110125 | -0.0078598 | 0.0192174 |
| 0.0055029 | 0.0068496 | 0.8033981 | 0.4217447 | -0.0079220 | 0.0189279 |
| 0.0056735 | 0.0069037 | 0.8218033 | 0.4111889 | -0.0078575 | 0.0192045 |
| 0.0058236 | 0.0069488 | 0.8380834 | 0.4019839 | -0.0077957 | 0.0194430 |
| 0.0051232 | 0.0067273 | 0.7615545 | 0.4463260 | -0.0080621 | 0.0183086 |
| 0.0056511 | 0.0068221 | 0.8283621 | 0.4074654 | -0.0077198 | 0.0190221 |
| 0.0059976 | 0.0069966 | 0.8572210 | 0.3913228 | -0.0077154 | 0.0197106 |
| 0.0048122 | 0.0066150 | 0.7274683 | 0.4669391 | -0.0081529 | 0.0177773 |
| 0.0045900 | 0.0065296 | 0.7029613 | 0.4820799 | -0.0082077 | 0.0173878 |
| 0.0068564 | 0.0072283 | 0.9485520 | 0.3428485 | -0.0073107 | 0.0210235 |
| 0.0058646 | 0.0069599 | 0.8426262 | 0.3994375 | -0.0077765 | 0.0195056 |
| 0.0058366 | 0.0069522 | 0.8395315 | 0.4011711 | -0.0077895 | 0.0194626 |
| 0.0058063 | 0.0069522 | 0.8351806 | 0.4036160 | -0.0078197 | 0.0194323 |
| 0.0055371 | 0.0068573 | 0.8074772 | 0.4193916 | -0.0079029 | 0.0189771 |
| 0.0055548 | 0.0068632 | 0.8093511 | 0.4183132 | -0.0078969 | 0.0190065 |
| 0.0060017 | 0.0070146 | 0.8556028 | 0.3922175 | -0.0077466 | 0.0197500 |
| 0.0056082 | 0.0068395 | 0.8199801 | 0.4122275 | -0.0077969 | 0.0190134 |
| 0.0064898 | 0.0071724 | 0.9048259 | 0.3655576 | -0.0075679 | 0.0205475 |
| 0.0047966 | 0.0065291 | 0.7346455 | 0.4625554 | -0.0080002 | 0.0175934 |
| 0.0059098 | 0.0069773 | 0.8470063 | 0.3969916 | -0.0077654 | 0.0195850 |
| 0.0055132 | 0.0068349 | 0.8066315 | 0.4198788 | -0.0078829 | 0.0189094 |
| 0.0052111 | 0.0067253 | 0.7748407 | 0.4384338 | -0.0079703 | 0.0183925 |
| 0.0055324 | 0.0068514 | 0.8074905 | 0.4193840 | -0.0078960 | 0.0189609 |
| 0.0055991 | 0.0066465 | 0.8424113 | 0.3995577 | -0.0074278 | 0.0186259 |
| 0.0055835 | 0.0067961 | 0.8215642 | 0.4113250 | -0.0077367 | 0.0189037 |
| 0.0056130 | 0.0065669 | 0.8547288 | 0.3927013 | -0.0072580 | 0.0184839 |
| 0.0056079 | 0.0066092 | 0.8485059 | 0.3961563 | -0.0073458 | 0.0185617 |
| 0.0056868 | 0.0068046 | 0.8357262 | 0.4033090 | -0.0076500 | 0.0190235 |
| 0.0055864 | 0.0068633 | 0.8139504 | 0.4156734 | -0.0078654 | 0.0190382 |
| 0.0056997 | 0.0071114 | 0.8014888 | 0.4228487 | -0.0082384 | 0.0196379 |
| 0.0055903 | 0.0068916 | 0.8111685 | 0.4172689 | -0.0079171 | 0.0190977 |
| 0.0055816 | 0.0068700 | 0.8124595 | 0.4165280 | -0.0078833 | 0.0190465 |
| 0.0055983 | 0.0066694 | 0.8393959 | 0.4012472 | -0.0074735 | 0.0186701 |
| 0.0055822 | 0.0068363 | 0.8165435 | 0.4141894 | -0.0078168 | 0.0189811 |
| 0.0056249 | 0.0065343 | 0.8608266 | 0.3893335 | -0.0071821 | 0.0184318 |
| 0.0056485 | 0.0064875 | 0.8706811 | 0.3839283 | -0.0070667 | 0.0183638 |
| 0.0056102 | 0.0066330 | 0.8458126 | 0.3976573 | -0.0073901 | 0.0186106 |
| 0.0055905 | 0.0068507 | 0.8160448 | 0.4144745 | -0.0078367 | 0.0190177 |
| 0.0053930 | 0.0070658 | 0.7632552 | 0.4453112 | -0.0084557 | 0.0192416 |
| 0.0055801 | 0.0068262 | 0.8174510 | 0.4136707 | -0.0077990 | 0.0189592 |
| 0.0055810 | 0.0068353 | 0.8164955 | 0.4142168 | -0.0078159 | 0.0189779 |
| 0.0056083 | 0.0069266 | 0.8096825 | 0.4181227 | -0.0079675 | 0.0191842 |
| 0.0057591 | 0.0071793 | 0.8021866 | 0.4224450 | -0.0083120 | 0.0198303 |
| 0.0059528 | 0.0074045 | 0.8039441 | 0.4214293 | -0.0085597 | 0.0204653 |
| 0.0059585 | 0.0074101 | 0.8040987 | 0.4213400 | -0.0085651 | 0.0204821 |
| 0.0056115 | 0.0066172 | 0.8480111 | 0.3964318 | -0.0073581 | 0.0185811 |
| 0.0055684 | 0.0068299 | 0.8152930 | 0.4149046 | -0.0078180 | 0.0189548 |
| 0.0055737 | 0.0068155 | 0.8178004 | 0.4134712 | -0.0077844 | 0.0189319 |
| 0.0055743 | 0.0068285 | 0.8163248 | 0.4143144 | -0.0078093 | 0.0189578 |
| 0.0054540 | 0.0069514 | 0.7845873 | 0.4326956 | -0.0081705 | 0.0190785 |
| 0.0056756 | 0.0070239 | 0.8080423 | 0.4190662 | -0.0080910 | 0.0194422 |
| 0.0057793 | 0.0071955 | 0.8031750 | 0.4218736 | -0.0083237 | 0.0198822 |
| 0.0056790 | 0.0064886 | 0.8752344 | 0.3814464 | -0.0070384 | 0.0183964 |
| 0.0056240 | 0.0067623 | 0.8316720 | 0.4055941 | -0.0076298 | 0.0188778 |
| 0.0057148 | 0.0070980 | 0.8051242 | 0.4207480 | -0.0081970 | 0.0196266 |
| 0.0057485 | 0.0071793 | 0.8006998 | 0.4233055 | -0.0083227 | 0.0198197 |
| 0.0073664 | 0.0057158 | 1.2887766 | 0.1974758 | -0.0038364 | 0.0185692 |
| 0.0056738 | 0.0074158 | 0.7650965 | 0.4442141 | -0.0088609 | 0.0202084 |
| 0.0087605 | 0.0050792 | 1.7247930 | 0.0845648 | -0.0011945 | 0.0187155 |
| 0.0065066 | 0.0082214 | 0.7914301 | 0.4286931 | -0.0096070 | 0.0226203 |
| 0.0054053 | 0.0072414 | 0.7464437 | 0.4553994 | -0.0087876 | 0.0195982 |
| 0.0056328 | 0.0068994 | 0.8164150 | 0.4142628 | -0.0078898 | 0.0191554 |
| 0.0056543 | 0.0068973 | 0.8197947 | 0.4123332 | -0.0078640 | 0.0191727 |
| 0.0058213 | 0.0068208 | 0.8534630 | 0.3934026 | -0.0075472 | 0.0191898 |
| 0.0056294 | 0.0069030 | 0.8154991 | 0.4147867 | -0.0079003 | 0.0191591 |
| 0.0052790 | 0.0071205 | 0.7413795 | 0.4584634 | -0.0086769 | 0.0192348 |
| 0.0052609 | 0.0071377 | 0.7370506 | 0.4610916 | -0.0087288 | 0.0192506 |
| 0.0057203 | 0.0068570 | 0.8342294 | 0.4041517 | -0.0077191 | 0.0191597 |
| 0.0057585 | 0.0068392 | 0.8419864 | 0.3997956 | -0.0076461 | 0.0191631 |
| 0.0057779 | 0.0068874 | 0.8389129 | 0.4015182 | -0.0077211 | 0.0192769 |
| 0.0049119 | 0.0070808 | 0.6936813 | 0.4878821 | -0.0089664 | 0.0187901 |
| 0.0055645 | 0.0068693 | 0.8100622 | 0.4179044 | -0.0078990 | 0.0190280 |
| 0.0063263 | 0.0067903 | 0.9316643 | 0.3515101 | -0.0069824 | 0.0196350 |
| 0.0056747 | 0.0068827 | 0.8244853 | 0.4096639 | -0.0078151 | 0.0191644 |
| 0.0046161 | 0.0070690 | 0.6530044 | 0.5137535 | -0.0092389 | 0.0184711 |
| 0.0054513 | 0.0068642 | 0.7941595 | 0.4271026 | -0.0080023 | 0.0189049 |
| 0.0070945 | 0.0073719 | 0.9623771 | 0.3358602 | -0.0073541 | 0.0215432 |
| 0.0055332 | 0.0068682 | 0.8056209 | 0.4204615 | -0.0079283 | 0.0189947 |
| 0.0055969 | 0.0068901 | 0.8123136 | 0.4166117 | -0.0079074 | 0.0191012 |
| 0.0058442 | 0.0069628 | 0.8393577 | 0.4012686 | -0.0078025 | 0.0194910 |
| 0.0051139 | 0.0067525 | 0.7573302 | 0.4488520 | -0.0081208 | 0.0183485 |
| 0.0047330 | 0.0067489 | 0.7013044 | 0.4831131 | -0.0084945 | 0.0179606 |
ggplot(results.Leave1effectout, aes(Estimate)) + geom_histogram(fill = "darkcyan",
col = "black", binwidth = 1e-04) + theme_bw() + theme(text = element_text(size = 20,
colour = "black", hjust = 0.5))results.Leave1effectout %>%
summarise(estimate = mean(Estimate), se = mean(SE), zval = mean(zval), pval = mean(pval),
ci.lb = mean(ci.lb), ci.ub = mean(ci.ub)) %>%
kable() %>%
kable_styling("striped", position = "left")| estimate | se | zval | pval | ci.lb | ci.ub |
|---|---|---|---|---|---|
| 0.0056545 | 0.0069012 | 0.8205943 | 0.4140513 | -0.0078716 | 0.0191806 |
Hernandez et al. (2002))d.raw<-read_csv("data/Raw_data.csv") # Load the raw data with this outlier
d.raw<-d.raw %>% # calculate effect sizes
mutate(ARR_f=((mean_high_f-mean_low_f)/(acc_temp_high-acc_temp_low)),
ARR_m=((mean_high_m-mean_low_m)/(acc_temp_high-acc_temp_low)),
ARRD=ARR_f - ARR_m,
Var_ARRD=((1/(acc_temp_high-acc_temp_low))^2*(sd_low_f^2/n_low_f_adj+sd_high_f^2/n_high_f_adj+sd_low_m^2/n_low_m_adj+sd_high_m^2/n_high_m_adj)),
precision=(1/sqrt(Var_ARRD)))
d.raw$es_ID=as.factor(d.raw$es_ID) # convert to factors the variables used as random effects
d.raw$species_ID=as.factor(d.raw$species_ID)
d.raw$shared_measurement_ID=as.factor(d.raw$shared_measurement_ID)
### Create a new phylogenetic variance covariance matrix
d.raw$genus_species<-as.factor(d.raw$genus_species)
taxa.raw <- tnrs_match_names(names = levels(d.raw$genus_species), context_name = "Animals")
d.raw$genus_species<-str_replace(d.raw$genus_species, "Gammarus marinus", "Marinogammarus marinus")
d.raw$genus_species<-str_replace(d.raw$genus_species, "Hyale hirtipalma", "Apohyale hirtipalma")
d.raw$genus_species<-str_replace(d.raw$genus_species, "Uca panacea", "Leptuca panacea")
phylo_tree.raw<-tol_induced_subtree(ott_ids=taxa.raw$ott_id, label_format = "name") set.seed(1234)
binary_tree.raw<-multi2di(phylo_tree.raw,random=TRUE)
d.raw$genus_species<-as.factor(d.raw$genus_species)
binary_tree.raw$tip.label<-as.factor(binary_tree.raw$tip.label)
levels(binary_tree.raw$tip.label)<-levels(d.raw$genus_species)
binary_tree.raw$tip.label<-as.character(binary_tree.raw$tip.label)
phylo_branch.raw<-compute.brlen(binary_tree.raw,method="Grafen",power=1)
phylo_matrix.raw<-vcv(phylo_branch.raw,cor=T)
###
d.raw<-as.data.frame(d.raw) # convert to dataframe to calculate the VCV matrix
VCV_ARRD.raw<- make_VCV_matrix(d.raw, V = "Var_ARRD", cluster = "shared_measurement_ID", obs = "es_ID") # generate the VCV matrix
meta_ana_model.all<-rma.mv(yi=ARRD~1, V=VCV_ARRD.raw, # run the meta-analytic model with the same structure as before
method="REML",
random=list(~1|species_ID,
~1|genus_species,
~1|es_ID),
R = list(genus_species = phylo_matrix.raw),
data=d.raw)
summary(meta_ana_model.all) # results of the model##
## Multivariate Meta-Analysis Model (k = 240; method: REML)
##
## logLik Deviance AIC BIC AICc
## 174.0176 -348.0351 -340.0351 -326.1293 -339.8642
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0090 0.0948 45 no species_ID no
## sigma^2.2 0.0000 0.0037 45 no genus_species yes
## sigma^2.3 0.0007 0.0265 240 no es_ID no
##
## Test for Heterogeneity:
## Q(df = 239) = 482.8002, p-val < .0001
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## -0.0035 0.0169 -0.2070 0.8360 -0.0366 0.0296
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Plot the results
orchard_plot(meta_ana_model.all,mod="Int",xlab="ARRD")+
annotate(geom = "text", x = -0.5, y = 1.5, label = paste0("italic(I)^{2} == ", round(i2_ml(meta_ana_model.all)[1] * 100, 2)), color = "black", parse = TRUE, size = 5) + # display heterogeneity
geom_errorbarh(aes(xmin = lowerPR, xmax = upperPR), height = 0, show.legend = FALSE, size = 0.8, alpha = 0.6)+ # change the thickness of prediction intervals
geom_errorbarh(aes(xmin = lowerCL, xmax = upperCL), height = 0.04, show.legend = FALSE, size = 1)+ # change the thickness of confidence intervals
annotate(geom = "text", x = -0.32, y = 1.49, label = "%", color = "black", parse = FALSE, size = 5) +
geom_point(aes(fill = name), size = 4.6, shape = 21)+ # change mean estimate point size
scale_colour_manual(values = "darkcyan")+ # change colour of data points
scale_fill_manual(values="gold") + # change colour of the mean estimate
scale_y_discrete(labels = "Overall mean")+ # rename y label
scale_size_continuous(range = c(1, 9)) + # change scaling of data points
theme(text = element_text(size = 20, colour = "black", hjust = 0.5),
axis.text.y = element_text(size = 15,colour = "black", hjust = 0.5),
legend.title = element_text(size=16))PBT dataThe sample size of PBT data was low so we decided to see if including these values influenced our interpretations
meta_ana_model.TL<-run.model(d.TL, ~1) # run the meta-analytic model with the data subset of thermal limits
summary(meta_ana_model.TL)##
## Multivariate Meta-Analysis Model (k = 226; method: REML)
##
## logLik Deviance AIC BIC AICc
## 205.8310 -411.6620 -403.6620 -389.9976 -403.4801
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0000 0.0069 38 no species_ID no
## sigma^2.2 0.0001 0.0092 38 no genus_species yes
## sigma^2.3 0.0007 0.0271 226 no es_ID no
##
## Test for Heterogeneity:
## Q(df = 225) = 365.0356, p-val < .0001
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## 0.0056 0.0073 0.7658 0.4438 -0.0087 0.0198
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
orchard_plot(meta_ana_model.TL,mod="Int",xlab="ARRD")+
annotate(geom = "text", x = -0.5, y = 1.5, label = paste0("italic(I)^{2} == ", round(i2_ml(meta_ana_model.TL)[1] * 100, 2)), color = "black", parse = TRUE, size = 5) + # display heterogeneity
geom_errorbarh(aes(xmin = lowerPR, xmax = upperPR), height = 0, show.legend = FALSE, size = 0.8, alpha = 0.6)+ # change the thickness of prediction intervals
geom_errorbarh(aes(xmin = lowerCL, xmax = upperCL), height = 0.04, show.legend = FALSE, size = 1)+ # change the thickness of confidence intervals
annotate(geom = "text", x = -0.32, y = 1.49, label = "%", color = "black", parse = FALSE, size = 5) +
geom_point(aes(fill = name), size = 4.6, shape = 21)+ # change mean estimate point size
scale_colour_manual(values = "darkcyan")+ # change colour of data points
scale_fill_manual(values="gold") + # change colour of the mean estimate
scale_y_discrete(labels = "Overall mean")+ # rename y label
scale_size_continuous(range = c(1, 9)) + # change scaling of data points
theme(text = element_text(size = 20, colour = "black", hjust = 0.5),
axis.text.y = element_text(size = 15,colour = "black", hjust = 0.5),
legend.title = element_text(size=16))major concernsThe major concerns identified in the data were:
Mixed varieties : data from two different varieties (which may differ in their thermal tolerance) were pooled in the original studyPeculiar methods for estimating Ctmax : CTmax was considered as the temperature at which 50% of the animals reach the endpoint, following an incremental increase in temperature.Peculiar methods for estimating Ctmin : CTmin was considered as the temperature at which 50% of the animals reach the endpoint, following an incremental decrease in temperature.Unequal duration of acclimation : The animals tested in this study were not acclimated for the same absolute duration, but were acclimated for an equivalent proportion of development (i.e. temperature influences development time, so animals acclimated to higher temperature were acclimated for shorter durations to obtain animals at the same developmental stage at the end of the acclimation period)kable(d$major_concern[d$major_concern != "NA"]) %>%
kable_styling("striped", position = "left") %>%
scroll_box(width = "100%", height = "500px")| x |
|---|
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| Unequal duration of acclimation. |
| Unequal duration of acclimation. |
| Unequal duration of acclimation. |
| Unequal duration of acclimation. |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| Peculiar method for estimating Ctmin |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| Peculiar method for estimating Ctmax |
| Peculiar method for estimating Ctmax |
| Peculiar method for estimating Ctmax |
| Peculiar method for estimating Ctmax |
| Peculiar method for estimating Ctmax |
| Peculiar method for estimating Ctmax |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| NA |
| Mixed varieties |
| NA |
| NA |
d.concerns <- subset(d, ref != "Piyaphongkul et al. 2014") # remove studies with major concerns
d.concerns <- subset(d.concerns, ref != "Kubisch et al. 2016")
d.concerns <- subset(d.concerns, ref != "Worthen and Haney 1999")
d.concerns <- subset(d.concerns, ref != "Cortemeglia and Beitinger 2006")
meta_ana_model.concerns <- run.model(d.concerns, ~1) # run the meta-analytic model with this curated data set
summary(meta_ana_model.concerns)##
## Multivariate Meta-Analysis Model (k = 226; method: REML)
##
## logLik Deviance AIC BIC AICc
## 189.2344 -378.4687 -370.4687 -356.8043 -370.2869
##
## Variance Components:
##
## estim sqrt nlvls fixed factor R
## sigma^2.1 0.0001 0.0074 40 no species_ID no
## sigma^2.2 0.0000 0.0069 40 no genus_species yes
## sigma^2.3 0.0009 0.0297 226 no es_ID no
##
## Test for Heterogeneity:
## Q(df = 225) = 374.3997, p-val < .0001
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## 0.0040 0.0065 0.6145 0.5389 -0.0088 0.0168
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
orchard_plot(meta_ana_model.concerns, mod = "Int", xlab = "ARRD") + annotate(geom = "text",
x = -0.5, y = 1.5, label = paste0("italic(I)^{2} == ", round(i2_ml(meta_ana_model.concerns)[1] *
100, 2)), color = "black", parse = TRUE, size = 5) + geom_errorbarh(aes(xmin = lowerPR,
xmax = upperPR), height = 0, show.legend = FALSE, size = 0.8, alpha = 0.6) +
geom_errorbarh(aes(xmin = lowerCL, xmax = upperCL), height = 0.04, show.legend = FALSE,
size = 1) + annotate(geom = "text", x = -0.32, y = 1.49, label = "%", color = "black",
parse = FALSE, size = 5) + geom_point(aes(fill = name), size = 4.6, shape = 21) +
scale_colour_manual(values = "darkcyan") + scale_fill_manual(values = "gold") +
scale_y_discrete(labels = "Overall mean") + scale_size_continuous(range = c(1,
9)) + theme(text = element_text(size = 20, colour = "black", hjust = 0.5), axis.text.y = element_text(size = 15,
colour = "black", hjust = 0.5), legend.title = element_text(size = 16))We modified the orchard_plot function to personalise graphs
my.orchard<-function (object, mod = "Int", xlab, N = "none",
alpha = 0.5, angle = 90, cb = TRUE, k = TRUE, transfm = c("none",
"tanh"))
{
mod_results<-function (model, mod) ### Changed the mod_results function to incorporate "robust.rma"
{
if (all(class(model) %in% c("robust.rma", "rma.mv", "rma")) ==
FALSE) {
stop("Sorry, you need to fit a metafor model of class rma.mv or rma")
}
data <- get_data(model, mod)
CI <- get_est(model, mod)
PI <- get_pred(model, mod)
model_results <- list(mod_table = cbind(CI, PI[, -1]), data = data)
class(model_results) <- "orchard"
return(model_results)
}
transfm <- match.arg(transfm)
if (any(class(object) %in% c("robust.rma","rma.mv", "rma"))) {
if (mod != "Int") {
object <- mod_results(object, mod)
}
else {
object <- mod_results(object, mod = "Int")
}
}
mod_table <- object$mod_table
data <- object$data
data$moderator <- factor(data$moderator, levels = mod_table$name,
labels = mod_table$name)
data$scale <- (1/sqrt(data[, "vi"]))
legend <- "Precision (1/SE)"
if (any(N != "none")) {
data$scale <- N
legend <- "Sample Size (N)"
}
if (transfm == "tanh") {
cols <- sapply(mod_table, is.numeric)
mod_table[, cols] <- Zr_to_r(mod_table[, cols])
data$yi <- Zr_to_r(data$yi)
label <- xlab
}
else {
label <- xlab
}
mod_table$K <- as.vector(by(data, data[, "moderator"],
function(x) length(x[, "yi"])))
group_no <- nrow(mod_table)
cbpl <- c("#E69F00", "#009E73", "#F0E442",
"#0072B2", "#D55E00", "#CC79A7", "#56B4E9",
"#999999")
plot <- ggplot2::ggplot(data = mod_table, aes(x = estimate,
y = name)) + ggbeeswarm::geom_quasirandom(data = data,
aes(x = yi, y = moderator, size = scale, col = moderator),
groupOnX = FALSE, alpha = alpha) + ggplot2::geom_errorbarh(aes(xmin = lowerPR,
xmax = upperPR), height = 0, show.legend = FALSE, size = 0.5,
alpha = 0.6) + ggplot2::geom_errorbarh(aes(xmin = lowerCL,
xmax = upperCL), height = 0, show.legend = FALSE, size = 1.2) +
ggplot2::geom_vline(xintercept = 0, linetype = 2, colour = "black",
alpha = alpha) + ggplot2::geom_point(aes(fill = name),
size = 3, shape = 21) + ggplot2::theme_bw() + ggplot2::guides(fill = "none",
colour = "none") + ggplot2::theme(legend.position = c(1,
0), legend.justification = c(1, 0)) + ggplot2::theme(legend.title = element_text(size = 14)) + #size changed to 14
ggplot2::theme(legend.direction = "horizontal") +
ggplot2::theme(legend.background = element_blank()) +
ggplot2::labs(x = label, y = "", size = legend) +
ggplot2::theme(axis.text.y = element_text(size = 14, #size changed to 14
colour = "black", hjust = 0.5, angle = angle))
if (cb == TRUE) {
plot <- plot + scale_fill_manual(values = cbpl) + scale_colour_manual(values = cbpl)
}
if (k == TRUE) {
plot <- plot + ggplot2::annotate("text", x = (max(data$yi) -
(max(data$yi) * 0.05)), y = (seq(1, group_no, 1) +
0.3), label = paste("italic(k)==", mod_table$K),
parse = TRUE, hjust = "right", size = 5.5) # size changed to 5.5
}
return(plot)
}Species-specific estimates were added to the phylogenetic tree and the plot of the meta-analytic mean in Powerpoint. Comestic adjustments were also performed in Powerpoint.
The phylogenetic tree can be found in Phylogenetic tree and variance-covariance matrices
d.species.plot<-d # Duplicate dataset to avoid modifications of the original one
d.species.plot$genus_species <- factor(d.species.plot$genus_species,c('Terrapene ornata','Terrapene carolina','Anolis sagrei','Liolaemus pictus','Eutropis longicaudata','Eutropis multifasciata',"Lampropholis coggeri", "Cordylus oelofseni","Hyperolius marmoratus","Pleurodema thaul","Eleutherodactylus coqui","Triturus dobrogicus","Dionda diaboli","Danio rerio","Acanthochromis polyacanthus","Poecilia reticulata","Gambusia affinis","Fundulus heteroclitus","Dasyatis sabina","Ophryotrocha labronica","Helicoverpa zea","Drosophila tripunctata","Drosophila putrida","Drosophila falleni","Drosophila melanogaster","Drosophila simulans","Anopheles funestus","Anopheles arabiensis","Tenebrio molitor", "Harmonia axyridis","Enochrus politus", "Hydroporus sabaudus","Nilaparvata lugens","Exosphaeroma gigas","Exosphaeroma laeviusculum","Apohyale hirtipalma","Hyale grandicornis",'Gammarus chevreuxi','Marinogammarus marinus','Corophium volutator','Crangon crangon','Leptuca panacea','Carcinus maenas','Pardosa furcifera')) # Re-order species name in the same order as the phylogenetic tree
mod.species<-run.model(d.species.plot, ~genus_species-1) # run the model with species name as a moderator to obtain species-specific estimates
result.mod.species<-mod_results(mod.species, "genus_species") # mod_results is a function from the orchaRd package (creates a table of model results)
mod.species.table<-result.mod.species$mod_table # coefficients for each species
data.species <- result.mod.species$data # all data points (used to display individual data points used to generate mean estimates
mod.species.table<-mod.species.table %>% mutate(taxon=c("Reptiles", "Reptiles", "Reptiles", "Reptiles", "Reptiles","Reptiles", "Reptiles", "Reptiles", "Amphibians", "Amphibians", "Amphibians", "Amphibians","Fishes", "Fishes","Fishes", "Fishes","Fishes", "Fishes","Fishes", "Aquatic Invertebrates", "Terrestrial Invertebrates", "Terrestrial Invertebrates", "Terrestrial Invertebrates", "Terrestrial Invertebrates", "Terrestrial Invertebrates", "Terrestrial Invertebrates", "Terrestrial Invertebrates", "Terrestrial Invertebrates", "Terrestrial Invertebrates", "Terrestrial Invertebrates", "Aquatic Invertebrates", "Aquatic Invertebrates", "Terrestrial Invertebrates", "Aquatic Invertebrates", "Aquatic Invertebrates","Aquatic Invertebrates","Aquatic Invertebrates","Aquatic Invertebrates","Aquatic Invertebrates","Aquatic Invertebrates","Aquatic Invertebrates","Aquatic Invertebrates", "Aquatic Invertebrates", "Terrestrial Invertebrates")) # Add the taxonomic group of each species to the data set to colour points differently for each taxonomic group
data.species$moderator <- factor(data.species$moderator, levels = mod.species.table$name, labels = mod.species.table$name) # convert the "moderator" (i.e. species name) as a factor and match it with the mod.species.table data
data.species$precision <- (1/sqrt(data.species[, "vi"])) # calculate the precision of the data points to scale the points on the plot
legend <- "Precision (1/SE)"
mod.species.table$K <- as.vector(by(data.species, data.species[, "moderator"], function(x) length(x[,"yi"]))) # calculate the number of effect sizes for each species
group_no <- nrow(mod.species.table) # number of species
cbpl <- viridis(5) # number of colors, here we took 5 discrete values from the viridis package
phylo.plot<-ggplot(data = mod.species.table, aes(x = estimate, y = name)) +
ggbeeswarm::geom_quasirandom(data = data.species, aes(x = yi, y = moderator, size = precision), groupOnX = FALSE, alpha=0.6, colour="grey40") + # geom_quasi random generates some random variation around the points so they do not overlap too much
geom_errorbarh(aes(xmin = lowerPR, xmax = upperPR), height = 0, show.legend = FALSE, size = 0.8, alpha = 0.6) + # prediction intervals
geom_errorbarh(aes(xmin = lowerCL, xmax = upperCL), alpha=0.7, height = 0.2, show.legend = FALSE, size = 1.5) + # confidence intervals
geom_vline(xintercept = 0, linetype = 2, colour = "black") + # vertical line at x = 0 (ARRD = 0)
geom_point(aes(fill = taxon), size = 6, shape = 21, alpha=1, stroke=1) + # colour each point as a function of the taxonomic group
scale_fill_manual(values = cbpl) + # colour the plots according to the cbpl we assigned (viridis(5))
labs(x = "ARRD", y = "") +
xlim(-1,1.4)+ # change the limit to make it match with the following plot (meta-analytic mean)
annotate("text", x = (max(data.species$yi) + (max(data.species$yi) * 0.6)), # add the number of effect sizes to the right panel of the plot
y = (seq(1, group_no, 1) + 0.33),
label = paste("italic(k)==", mod.species.table$K),
parse = TRUE, hjust = "right", size = 4.5)+
theme_classic()+ # classic theme
theme(legend.title = element_text(size = 14), # change font
legend.text = element_text(size = 14),
legend.background = element_blank(), # remove the background of the legend
axis.text.y = element_text(size = 12, colour = "black", hjust = 0.5, angle = 0, face="italic"), # italic
panel.background = element_rect(fill="transparent"), # make it transparent
plot.background = element_rect(fill="transparent", color=NA))
d.species.plot %>%
group_by(genus_species) %>% # calculate whether UTL, LTL and/or PBT were tested for each species (data used for the symbols displayed on the right side of FIGURE 2)
summarise(
`LTL` = n_distinct(es_ID[outcome=="LTL"]),
`UTL` = n_distinct(es_ID[outcome=="UTL"]),
`PBT` = n_distinct(es_ID[outcome=="PBT"]))## # A tibble: 44 x 4
## genus_species LTL UTL PBT
## <fct> <int> <int> <int>
## 1 Terrapene ornata 0 0 2
## 2 Terrapene carolina 0 0 2
## 3 Anolis sagrei 9 0 0
## 4 Liolaemus pictus 1 0 3
## 5 Eutropis longicaudata 1 0 0
## 6 Eutropis multifasciata 2 0 0
## 7 Lampropholis coggeri 0 2 0
## 8 Cordylus oelofseni 0 0 1
## 9 Hyperolius marmoratus 9 9 0
## 10 Pleurodema thaul 0 0 1
## # ... with 34 more rows
ma.plot<-my.orchard(meta_ana_model,mod="Int",xlab="ARRD", alpha=0.2)+
scale_y_discrete(labels = "")+ # no labels
geom_vline(xintercept = 0, linetype = 2, colour = "black")+ # vertical line at ARRD = 0
geom_errorbarh(aes(xmin = lowerPR, xmax = upperPR), height = 0, show.legend = FALSE, size = 0.75, alpha = 0.6)+ # prediction intervals
geom_errorbarh(aes(xmin = lowerCL, xmax = upperCL), height = 0.1, show.legend = FALSE, size = 1, alpha=0.85)+ # confidence intervals
geom_point(aes(fill = name),size = 4, shape = 23, alpha=1)+ # change shape to a triangle
scale_fill_manual(values="red") + # change colour of the estimate
scale_colour_manual(values="grey40") + # change colour of the data points
xlim(-1,1.4)+ # match xlim with phylo_plot
theme_classic()+ # classic theme
theme(panel.background = element_rect(fill="transparent"), # personalise theme
plot.background = element_rect(fill="transparent", color=NA),
axis.text.x = element_text(size = 16, colour = "black", hjust = 0.5, angle = 0),
text = element_text(size = 20, hjust=0.42, vjust=-0.4),
legend.position="none")phylo.plot/ma.plot + plot_layout(heights = c(15, 1.8)) # combine the two plotsggsave("output/Fig_2.png", width = 10, height = 16.8, dpi = 800, bg = "transparent") # save the plot. Cosmetics modifications were then performed in PowerpointWe created an alternative data set d.fm where the ARR was not separated according to the animal’ sex and “sex” was coded as a moderator. The formula to calculate the sampling variance of ARR, Var_ARR was adjusted (see below)
# Mean ARR values of males and females
d.fm<-read_csv("data/data_plot_fm.csv") # load the data set
d.fm<-subset(d.fm, ref!="Hernandez et al. 2002") # Remove the outlier
d.fm<-d.fm %>% # calculate effect sizes
mutate(ARR=(mean_high-mean_low)/(acc_temp_high - acc_temp_low),
Var_ARR=((1/(acc_temp_high-acc_temp_low))^2*(sd_low^2/n_low_adj+sd_high^2/n_high_adj)), # The formula of 'Var_ARR" was modified because it was not calculated on a comparison
precision=(1/sqrt(Var_ARR)))
d.fm$es_ID=as.factor(d.fm$es_ID) # Convert to factors the variables used as random effects
d.fm$species_ID=as.factor(d.fm$species_ID)
d.fm$shared_measurement_ID=as.factor(d.fm$shared_measurement_ID)
d.fm$sex=as.factor(d.fm$sex)
d.fm<-as.data.frame(d.fm) # convert to a data frame
VCV_ARR<- make_VCV_matrix(d.fm, V = "Var_ARR", cluster = "shared_measurement_ID", obs = "es_ID") # calculate a VCV matrix for the sampling variance of ARR
fm.model<-rma.mv(yi=ARR~sex-1, V=VCV_ARR, # the random effect structure was used, but here the response variable is ARR and the sampling variance is different.
method="REML",
random=list(~1|species_ID,
~1|es_ID), # all possible random effects
data=d.fm)
summary(fm.model) # Summary of the model##
## Multivariate Meta-Analysis Model (k = 478; method: REML)
##
## logLik Deviance AIC BIC AICc
## 198.8744 -397.7487 -389.7487 -373.0871 -389.6638
##
## Variance Components:
##
## estim sqrt nlvls fixed factor
## sigma^2.1 0.0197 0.1403 44 no species_ID
## sigma^2.2 0.0083 0.0913 478 no es_ID
##
## Test for Residual Heterogeneity:
## QE(df = 476) = 16529.3011, p-val < .0001
##
## Test of Moderators (coefficients 1:2):
## QM(df = 2) = 25.7472, p-val < .0001
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## sexfemale 0.1194 0.0236 5.0565 <.0001 0.0731 0.1657 ***
## sexmale 0.1121 0.0236 4.7431 <.0001 0.0658 0.1584 ***
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Plot the results
my.orchard(fm.model,mod="sex",xlab="ARR")+
geom_errorbarh(aes(xmin = lowerPR, xmax = upperPR), height = 0, show.legend = FALSE, size = 0.75, alpha = 0.5)+ # prediction intervals
geom_errorbarh(aes(xmin = lowerCL, xmax = upperCL), height = 0.05, show.legend = FALSE, size = 1.75)+ # confidence intervals
geom_point(aes(fill = name), size = 6, shape = 21, stroke=1.2)+ # mean estimate
scale_colour_manual(values = c("darkorange","purple"))+ # change colours
scale_fill_manual(values=c("darkorange","purple"))+
scale_size_continuous(range = c(1, 9))+ # change point scaling
scale_x_continuous(breaks = c(-0.5,0,0.5,1, 1.5))+ # change cuts on the x axis
theme(text = element_text(size = 24), # change font sizes
legend.title = element_text(size = 15),
legend.text = element_text(size = 13))ggsave("output/Fig_3.png", width=10, height=7, dpi=1200, bg="transparent") # save the plot# Create a function to run both plots with the same structure
plot.four.levels.pub<-function(data,formula,moderator){
model<-run.model(data,formula) #Run the model that will be used for the plot (must be a model without intercept)
my.orchard(model, mod=moderator,xlab="ARRD")+ #Create an orchard plot
geom_errorbarh(aes(xmin = lowerPR, xmax = upperPR), height = 0, show.legend = FALSE, size = 0.75, alpha = 0.5)+
geom_errorbarh(aes(xmin = lowerCL, xmax = upperCL), height = 0.075, show.legend = FALSE, size = 1.25)+
geom_point(aes(fill = name), size = 3.8, shape = 21, stroke=1.2)+
scale_size_continuous(range = c(1, 10))+
scale_colour_manual(values = c("dodgerblue2","royalblue2","orange2","sienna2"))+
scale_fill_manual(values=c("dodgerblue2","royalblue2","orange2","sienna2"))+
xlim(-0.6, 0.87)+
theme(text = element_text(size = 24),
legend.position = c(1,0.01),
panel.border = element_rect(colour = "black", fill=NA, size=1),
axis.text.y = element_text(size = 16,colour = "black", hjust = 0.5, angle = 0),
axis.text.x=element_text(size=16),
legend.text=element_text(size=15))
}
p4A<-plot.four.levels(d.TL,~int.habitat_outcome-1,"int.habitat_outcome")+
geom_errorbarh(aes(xmin = lowerPR, xmax = upperPR), height = 0, show.legend = FALSE, size = 0.75, alpha = 0.5)+
geom_errorbarh(aes(xmin = lowerCL, xmax = upperCL), height = 0.075, show.legend = FALSE, size = 1.25)+
geom_point(aes(fill = name), size = 3.8, shape = 21, stroke=1.2)+
scale_size_continuous(range = c(1, 10))+
scale_colour_manual(values = c("#00BFC4","#00BBD8","coral1","coral2"))+
scale_fill_manual(values=c("#00BFC4","#00BBD8","coral1","coral2"))+
xlim(-0.6, 0.87)+
theme(text = element_text(size = 24),
legend.position = c(1,0.01),
panel.border = element_rect(colour = "black", fill=NA, size=1),
axis.text.y = element_text(size = 16,colour = "black", hjust = 0.5, angle = 0),
axis.text.x=element_text(size=16),
legend.text=element_text(size=15))+
annotate("text", x=0.87,y=0.65, label="A", size=8)+
annotate("text", x=0.4,y=2, label="*", size=18 ,col="#00BBD8")+
coord_flip()
p4B<-my.orchard(robust.rma.mv(run.model(d.TL, ~int.origin_outcome - 1), cluster = d.TL$species_ID), mod="int.origin_outcome", xlab="ARRD")+
geom_errorbarh(aes(xmin = lowerPR, xmax = upperPR), height = 0, show.legend = FALSE, size = 0.75, alpha = 0.5)+
geom_errorbarh(aes(xmin = lowerCL, xmax = upperCL), height = 0.075, show.legend = FALSE, size = 1.25)+
geom_point(aes(fill = name), size = 3.8, shape = 21, stroke=1.2)+
scale_size_continuous(range = c(1, 10))+
scale_colour_manual(values = c("#00BFC4","#00BBD8","coral1","coral2"))+
scale_fill_manual(values=c("#00BFC4","#00BBD8","coral1","coral2"))+
xlim(-0.6, 0.87)+
theme(text = element_text(size = 24),
legend.position = c(1,0.01),
panel.border = element_rect(colour = "black", fill=NA, size=1),
axis.text.y = element_text(size = 16,colour = "black", hjust = 0.5, angle = 0),
axis.text.x=element_text(size=16),
legend.text=element_text(size=15))+
annotate("text", x=0.87,y=0.65, label="B", size=8)+
annotate("text", x=0.5,y=4,label="*", size=18, col="coral2")+
coord_flip()
p4A+p4B # combine plots ggsave("output/Fig_4AB.png", width=14, height=8, dpi=1200)The four figures were then combined in Powerpoint and we made some cosmetics adjustments. For some reason, this part of the code, although working, does not knit. Therefore, I pasted the code as comments for it to appear in the knitted file.
# ##### Figure 4C ##### MDI_model<-run.model(d,~MDI) pred_MDI_model <-
# predict.rma(robust.rma.mv(MDI_model, cluster=d$species_ID))
# d.MDI<-subset(d,MDI!='NA') d.MDI <- mutate(d.MDI, ci.lb =
# pred_MDI_model$ci.lb, ci.ub = pred_MDI_model$ci.ub, fit =
# pred_MDI_model$pred) p4C<-ggplot(d,aes(x = MDI, y = ARRD, fill=outcome)) +
# geom_point(aes(size=(1/sqrt(Var_ARRD)), col=outcome), shape=21, alpha=0.7,
# col='gray35', stroke=0.1) + geom_ribbon(data=d.MDI,aes(ymin = ci.lb, ymax =
# ci.ub, color = NULL), alpha = .3, fill = 'grey30') +
# geom_line(data=d.MDI,aes(y = fit), size = 1.5, colour = 'black')+
# scale_fill_manual(values=c('#00BDD0','#CF78FF','coral2'))+ labs(x = 'Body
# mass dimorphism index', y = 'ARRD', size = 'Precision (1/SE)') +
# scale_size_continuous(range = c(1, 11)) + annotate('text', x=-3,y=0.87,
# label='C', size=8)+ annotate('text', x=-2.5,y=-0.15, label='*', size=18,
# col='black')+ geom_hline(yintercept = 0,linetype = 2, colour = 'black',
# alpha=0.8)+ geom_vline(xintercept = 0,linetype = 2, colour =
# 'black',alpha=0.5) + ylim(-0.6,0.87) + theme_bw() + theme(text =
# element_text(size = 24), axis.text.y = element_text(size = 16, colour =
# 'black', hjust = 0.5, angle = 0), axis.text.x = element_text(size = 16,
# colour = 'black', hjust = 0.5, angle = 0), axis.title.x =
# element_text(hjust=0.6,vjust=-0.5), legend.title = element_text(size = 14),
# legend.text = element_text(size = 14), legend.position = c(1, 1),
# legend.justification = c(1,1), legend.box.just = 'right', legend.direction =
# 'horizontal', legend.background = element_blank(), panel.border =
# element_rect(colour = 'black', fill=NA, size=1))+ guides(fill = 'none',
# colour = 'none') # Remove legend (they were added manually in Powerpoint)
# #### Figure 4D #### d.acc.UTL<-subset(d.UTL,acc_duration!='NA')
# d.acc.LTL<-subset(d.LTL,acc_duration!='NA') ## Prediction: Outcome = UTL
# acc_model.UTL<-run.model(d.acc.UTL,~z_acc_duration) pred_acc_model.UTL<-
# predict.rma(robust.rma.mv(acc_model.UTL, cluster=d.acc.UTL$species_ID))
# d.acc.UTL <- mutate(d.acc.UTL, ci.lb = pred_acc_model.UTL$ci.lb, ci.ub =
# pred_acc_model.UTL$ci.ub, fit = pred_acc_model.UTL$pred) ## Prediction:
# Outcome = LTL acc_model.LTL<-run.model(d.acc.LTL,~z_acc_duration)
# pred_acc_model.LTL<- predict.rma(robust.rma.mv(acc_model.LTL,
# cluster=d.acc.LTL$species_ID)) d.acc.LTL <- mutate(d.acc.LTL, ci.lb =
# pred_acc_model.LTL$ci.lb, ci.ub = pred_acc_model.LTL$ci.ub, fit =
# pred_acc_model.LTL$pred) p4D<-ggplot(data=d.TL, aes(x=acc_duration, y=ARRD,
# fill=outcome))+ geom_point(aes(size=(1/sqrt(Var_ARRD)), col=outcome),
# shape=21, alpha=0.7, col='gray35', stroke=0.1) +
# geom_ribbon(data=d.acc.UTL,aes(ymin = ci.lb, ymax = ci.ub, color = NULL),
# alpha = .3) + geom_ribbon(data= d.acc.LTL,aes(ymin = ci.lb, ymax = ci.ub,
# color = NULL), alpha = .3) + geom_line(data=d.acc.UTL,aes(y = fit), size =
# 1.5, col='coral2')+ geom_line(data= d.acc.LTL,aes(y = fit), size = 1.5,
# col='#00BDD0')+ scale_fill_manual(values=c('#00BDD0','coral2'))+
# scale_color_manual(values=c('#00BDD0','coral2'))+ labs(x = 'Duration of
# acclimation (days)', y = 'ARRD', size = 'Precision (1/SE)') +
# scale_size_continuous(range = c(1, 11)) + scale_x_continuous(breaks =
# c(0,50,100))+ annotate('text', x=0,y=0.87, label='D', size=8)+
# annotate('text', x=70,y=-0.18, label='*', size=18 ,col='#00BDD0')+
# geom_hline(yintercept = 0,linetype = 2, colour = 'black', alpha=0.8)+
# ylim(-0.6,0.87) + theme_bw() + theme(text = element_text(size = 24),
# axis.text.y = element_text(size = 16, colour = 'black', hjust = 0.5, angle =
# 0), axis.text.x = element_text(size = 16, colour = 'black', hjust = 0.5,
# angle = 0), axis.title.x = element_text(hjust=0.6,vjust=-0.5), legend.title =
# element_text(size = 14), legend.text = element_text(size = 14),
# legend.position = c(1, 1), legend.justification = c(1,1), legend.box.just =
# 'right', legend.direction = 'horizontal', legend.background =
# element_blank(), panel.border = element_rect(colour = 'black', fill=NA,
# size=1))+ guides(fill = 'none', colour = 'none') # Remove legend (they were
# added manually in Powerpoint) p4C+p4DsessionInfo()## R version 4.1.0 (2021-05-18)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 19042)
##
## Matrix products: default
##
## locale:
## [1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252
## [3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
## [5] LC_TIME=English_Australia.1252
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] GGally_2.1.1 MuMIn_1.43.17 car_3.0-11 carData_3.0-4
## [5] orchaRd_0.0.0.9000 patchwork_1.1.1 metafor_2.4-0 Matrix_1.3-3
## [9] ape_5.5 rotl_3.0.11 maps_3.3.0 cowplot_1.1.1
## [13] viridis_0.6.1 viridisLite_0.4.0 DataExplorer_0.8.2 kableExtra_1.3.4
## [17] forcats_0.5.1 stringr_1.4.0 dplyr_1.0.6 purrr_0.3.4
## [21] readr_1.4.0 tidyr_1.1.3 tibble_3.1.2 ggplot2_3.3.3
## [25] tidyverse_1.3.1
##
## loaded via a namespace (and not attached):
## [1] nlme_3.1-152 fs_1.5.0 lubridate_1.7.10 RColorBrewer_1.1-2
## [5] webshot_0.5.2 progress_1.2.2 httr_1.4.2 tools_4.1.0
## [9] backports_1.2.1 bslib_0.2.5.1 utf8_1.2.1 R6_2.5.0
## [13] DBI_1.1.1 colorspace_2.0-1 withr_2.4.2 tidyselect_1.1.1
## [17] gridExtra_2.3 prettyunits_1.1.1 curl_4.3.1 compiler_4.1.0
## [21] cli_3.0.0 rvest_1.0.0 formatR_1.11 xml2_1.3.2
## [25] bookdown_0.22 sass_0.4.0 scales_1.1.1 systemfonts_1.0.2
## [29] digest_0.6.27 foreign_0.8-81 rmarkdown_2.9 svglite_2.0.0
## [33] rio_0.5.27 rentrez_1.2.3 pkgconfig_2.0.3 htmltools_0.5.1.1
## [37] dbplyr_2.1.1 htmlwidgets_1.5.3 rlang_0.4.11 readxl_1.3.1
## [41] rstudioapi_0.13 jquerylib_0.1.4 generics_0.1.0 jsonlite_1.7.2
## [45] zip_2.2.0 magrittr_2.0.1 Rcpp_1.0.7 munsell_0.5.0
## [49] fansi_0.4.2 abind_1.4-5 lifecycle_1.0.0 stringi_1.6.1
## [53] yaml_2.2.1 plyr_1.8.6 grid_4.1.0 parallel_4.1.0
## [57] crayon_1.4.1 rncl_0.8.4 lattice_0.20-44 haven_2.4.1
## [61] hms_1.1.0 knitr_1.33 pillar_1.6.1 igraph_1.2.6
## [65] stats4_4.1.0 reprex_2.0.0 XML_3.99-0.6 glue_1.4.2
## [69] evaluate_0.14 data.table_1.14.0 modelr_0.1.8 vctrs_0.3.8
## [73] rmdformats_1.0.2 networkD3_0.4 cellranger_1.1.0 gtable_0.3.0
## [77] reshape_0.8.8 assertthat_0.2.1 openxlsx_4.2.4 xfun_0.23
## [81] broom_0.7.8 ellipsis_0.3.2