PREDATOR-PREY TEMPORAL NICHE PARTITIONING UNDER HUMAN DISTURBANCE

Supplementary Material

Published

August 12, 2025


1 Setting up

1.1 Loading packages

Code
rm(list = ls())


## Loading packages ----
pacman::p_load(devtools, 
               tidyverse, 
               metafor, 
               patchwork, 
               R.rsp, 
               emmeans,
               orchaRd,
               metafor,
               dplyr,
               broom,
               tidyverse,
               here,
               broom,
               ggplot2,
               data.table,
               Matrix, 
               matrixcalc,
               ape, 
               multcomp ,
               miWQS,
               brms,
               pander,
               kableExtra,
               ggnewscale,
               colorspace,
               functional,
               scales,
               tidybayes
               ) 

#for the model loops below

1.2 Reading in datasets and metadata

Code
#Read in predator-prey overlap data and meta-data
dat_pp <- read.csv(here("data", "Revision", "clean_paired_overlap_revision.csv")) 
meta_pp <- read.csv(here("data","Revision", "Pred_prey_meta.csv"))
#Read in single species dataset
dat_sp <- dat <- read.csv(here("data","Revision", "clean_single_species_data_revision.csv")) 
meta_sp <- read.csv(here("data", "Revision","Single_species_meta.csv"))
#read in data for nocturnality analysis
dat_noct <- read.csv(here("data", "Revision","clean_noct_revision.csv")) 
meta_noct <- read.csv(here("data", "Revision","noct_meta.csv"))

1.3 Reading in phylogenetic trees

Code
# getting tree's for both predators and prey
tree1_pp <- read.tree(here("Tree", "tree1.tre"))
tree2_pp <- read.tree(here("Tree", "tree2.tre"))

# getting branch length and correlation matrix for predator prey
tree1b_pp <- compute.brlen(tree1_pp)
cor1_pp <-  vcv(tree1b_pp, corr=T)

tree2b_pp <- compute.brlen(tree2_pp)
cor2_pp <-  vcv(tree2b_pp, corr=T)

# getting tree for single species

tree1_sp <- read.tree(here("Tree", "Tree_single_revision.tre"))

# getting branch length and correlation matrix for single species
tree1b_sp <- compute.brlen(tree1_sp)
cor1_sp <-  vcv(tree1b_sp, corr=T)

# getting tree for nocturnality

tree1_noct <- read.tree(here("Tree", "tree_noct.tre"))

# getting branch length and correlation matrix for single species
tree1b_noct <- compute.brlen(tree1_noct)
cor1_noct <-  vcv(tree1b_noct, corr=T)

1.4 Correlation matrices to account for non-independence in models

Code
#Matrix to account for non-independence in studies and observations - predator prey

vcv_pp <- vcalc(vi_diff, cluster = Study_ID, obs = Obs_ID, rho = 0.5, 
              data = dat_pp) 
              
#same but single species

vcv_sp <- vcalc(vi_rev, cluster = Study_ID, obs = Obs_ID, rho = 0.5, 
             data = dat_sp) 

#Nocturnality vcv
vcv_noct <- vcalc(vi, cluster = Study_ID, obs = Obs_ID, rho = 0.5, # rho is usually 0.5 or 0.8
              data = dat_noct)

#Filered and split analysis filtering

herb_sp <- filter(dat_sp, treatment == "Prey")

vcvherb_sp <- vcalc(vi_rev, cluster = Study_ID, obs = Obs_ID, rho = 0.5, 
             data = herb_sp) 

pred_sp <- filter(dat_sp, treatment == "Predator")

vcvpred_sp <- vcalc(vi_rev, cluster = Study_ID, obs = Obs_ID, rho = 0.5, 
             data = pred_sp) 

#For noct analysis
herbnoct <- filter(dat_noct, treatment == "Prey")

vcvherb_noct <- vcalc(vi, cluster = Study_ID, obs = Obs_ID, rho = 0.5, 
             data = herbnoct) 

prednoct <- filter(dat_noct, treatment == "Predator")

vcvpred_noct <- vcalc(vi, cluster = Study_ID, obs = Obs_ID, rho = 0.5, 
             data = prednoct) 

2 Meta-analysis predator-prey

Code
  mod1_diff <- rma.mv(yi = overlap_diff_logit, V = vcv_pp,
                      random = list(~1 | Study_ID,
                                    ~1 | Predator, # phylo effect of Predactor
                                    ~1 | Predator2, # non-phylo effect 
                                    ~1 | Prey, # phylo effect of Prey
                                    ~1 | Prey2, # non-phylo effect of Prey
                                    ~1 | Obs_ID), # this is needed
                      data =  dat_pp,
                      test = "t",
                      sparse = TRUE,
                      R = list(Predator2 = cor1_pp, Prey2 = cor2_pp)
  )

  summary(mod1_diff)

Multivariate Meta-Analysis Model (k = 480; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-531.5251  1063.0502  1077.0502  1106.2521  1077.2880   

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0284  0.1685     57     no   Study_ID   no 
sigma^2.2  0.0472  0.2172     33     no   Predator   no 
sigma^2.3  0.0000  0.0001     33     no  Predator2  yes 
sigma^2.4  0.0192  0.1386    106     no       Prey   no 
sigma^2.5  0.0579  0.2405    106     no      Prey2  yes 
sigma^2.6  0.3380  0.5814    480     no     Obs_ID   no 

Test for Heterogeneity:
Q(df = 479) = 5544.6994, p-val < .0001

Model Results:

estimate      se    tval   df    pval    ci.lb   ci.ub    
  0.0143  0.1446  0.0992  479  0.9211  -0.2697  0.2984    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
dif <- orchard_plot(mod1_diff, xlab = "Change in temporal overlap", group = "Study_ID")

dif

Code
i2_ml(mod1_diff)
    I2_Total  I2_Study_ID  I2_Predator I2_Predator2      I2_Prey     I2_Prey2 
8.695345e+01 5.031403e+00 8.363439e+00 5.382091e-07 3.404207e+00 1.025444e+01 
   I2_Obs_ID 
5.989995e+01 

3 Meta-regression:Uni-moderator predator-prey

3.1 Trophic level

Code
mod_troph <- rma.mv(yi = overlap_diff_logit, V = vcv_pp,
                  random = list(~1 | Study_ID,
                                ~1 | Predator, # phylo effect of Predactor
                                ~1 | Predator2, # non-phylo effect 
                                ~1 | Prey, # phylo effect of Prey
                                ~1 | Prey2, # non-phylo effect of Prey
                                ~1 | Obs_ID), # this is needed
                  mods = ~ Trophic - 1 ,
                  data =  dat_pp,
                  test = "t",
                  sparse = TRUE,
                  R = list(Predator = cor1_pp, Prey = cor2_pp)
)

summary(mod_troph)

Multivariate Meta-Analysis Model (k = 480; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-529.8969  1059.7938  1075.7938  1109.1507  1076.1008   

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0291  0.1705     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0000     33     no   Predator  yes 
sigma^2.3  0.0472  0.2173     33     no  Predator2   no 
sigma^2.4  0.0689  0.2624    106     no       Prey  yes 
sigma^2.5  0.0192  0.1387    106     no      Prey2   no 
sigma^2.6  0.3370  0.5806    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5200.7790, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 478) = 0.0213, p-val = 0.9790

Model Results:

                  estimate      se     tval   df    pval    ci.lb   ci.ub    
TrophicHerbivore    0.0259  0.1677   0.1544  478  0.8774  -0.3037  0.3555    
TrophicPredator    -0.0102  0.1968  -0.0517  478  0.9588  -0.3969  0.3766    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
Tro <- orchard_plot(mod_troph, xlab = "Change in temporal overlap", group = "Study_ID", mod = "Trophic")
Tro

3.2 Temporal or spatial disturbance disturbance

Code
dat_pp <- dat_pp %>%
  mutate(temporal_disturbance = case_when(
    Before_after_disturbance > 0.9 ~ "temporal",
    TRUE ~ "Not"
  ))

  mod3_diff <- rma.mv(yi = overlap_diff_logit, V = vcv_pp,
                      random = list(~1 | Study_ID,
                                    ~1 | Predator, # phylo effect of Predactor
                                    ~1 | Predator2, # non-phylo effect 
                                    ~1 | Prey, # phylo effect of Prey
                                    ~1 | Prey2, # non-phylo effect of Prey
                                    ~1 | Obs_ID), # this is needed
                      mods = ~ temporal_disturbance -1,
                      data =  dat_pp,
                      test = "t",
                      sparse = TRUE,
                      R = list(Predator = cor1_pp, Prey = cor2_pp)
  )
  saveRDS(mod3_diff, here("R", "Outputs", "mod_before_after.Rds"))
  summary(mod3_diff)

Multivariate Meta-Analysis Model (k = 480; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-530.1203  1060.2406  1076.2406  1109.5974  1076.5476   

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0281  0.1677     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0000     33     no   Predator  yes 
sigma^2.3  0.0476  0.2183     33     no  Predator2   no 
sigma^2.4  0.0591  0.2431    106     no       Prey  yes 
sigma^2.5  0.0195  0.1397    106     no      Prey2   no 
sigma^2.6  0.3374  0.5808    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5542.1533, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 478) = 0.4352, p-val = 0.6474

Model Results:

                              estimate      se     tval   df    pval    ci.lb 
temporal_disturbanceNot        -0.0079  0.1475  -0.0534  478  0.9575  -0.2977 
temporal_disturbancetemporal    0.1296  0.1916   0.6762  478  0.4992  -0.2469 
                               ci.ub    
temporal_disturbanceNot       0.2820    
temporal_disturbancetemporal  0.5060    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
dif_3 <- orchard_plot(mod3_diff, mod = "temporal_disturbance", 
                      xlab = "Change in temporal overlap", group = "Study_ID", flip = F
                      )

dif_3

3.3 Type of disturbance

Code
mod2 <- rma.mv(yi = overlap_diff_logit, V = vcv_pp,
                    random = list(~1 | Study_ID,
                                  ~1 | Predator, # phylo effect of Predactor
                                  ~1 | Predator2, # non-phylo effect 
                                  ~1 | Prey, # phylo effect of Prey
                                  ~1 | Prey2, # non-phylo effect of Prey
                                  ~1 | Obs_ID), # this is needed
                    mods = ~ Disturbance_type -1 ,
                    #control=list(optimizer="Nelder-Mead"),
                    data =  dat_pp,
                    test = "t",
                    sparse = TRUE,
                    R = list(Predator = cor1_pp, Prey = cor2_pp)
)

summary(mod2)

Multivariate Meta-Analysis Model (k = 480; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-520.3655  1040.7310  1068.7310  1126.9287  1069.6500   

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0277  0.1665     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0000     33     no   Predator  yes 
sigma^2.3  0.0494  0.2222     33     no  Predator2   no 
sigma^2.4  0.0700  0.2646    106     no       Prey  yes 
sigma^2.5  0.0225  0.1499    106     no      Prey2   no 
sigma^2.6  0.3343  0.5782    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 472) = 5471.9842, p-val < .0001

Test of Moderators (coefficients 1:8):
F(df1 = 8, df2 = 472) = 0.8195, p-val = 0.5856

Model Results:

                                     estimate      se     tval   df    pval 
Disturbance_typeAgregate               0.0493  0.2394   0.2058  472  0.8370 
Disturbance_typeAgriculture            0.1658  0.1950   0.8504  472  0.3955 
Disturbance_typeHabitat loss          -0.3803  0.2712  -1.4019  472  0.1616 
Disturbance_typeHuman_presence        -0.0292  0.1679  -0.1741  472  0.8618 
Disturbance_typePredator_control      -0.0511  0.2629  -0.1946  472  0.8458 
Disturbance_typeProtected area        -0.1249  0.3717  -0.3360  472  0.7370 
Disturbance_typeResource_extraction    0.0631  0.8347   0.0755  472  0.9398 
Disturbance_typeUrbanisation           0.2123  0.2155   0.9848  472  0.3252 
                                       ci.lb   ci.ub    
Disturbance_typeAgregate             -0.4212  0.5198    
Disturbance_typeAgriculture          -0.2173  0.5489    
Disturbance_typeHabitat loss         -0.9132  0.1527    
Disturbance_typeHuman_presence       -0.3591  0.3006    
Disturbance_typePredator_control     -0.5677  0.4654    
Disturbance_typeProtected area       -0.8552  0.6054    
Disturbance_typeResource_extraction  -1.5772  1.7033    
Disturbance_typeUrbanisation         -0.2113  0.6358    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
dif_herb <- orchard_plot(mod2, xlab = "Change in temporal overlap", group = "Study_ID",
                      mod = "Disturbance_type")

dif_herb

3.4 Subordinate body mass

Code
mod_sub_mass <- rma.mv(yi = overlap_diff_logit, V = vcv_pp,
                          random = list(~1 | Study_ID,
                                        ~1 | Predator, # phylo effect of Predactor
                                        ~1 | Predator2, # non-phylo effect 
                                        ~1 | Prey, # phylo effect of Prey
                                        ~1 | Prey2, # non-phylo effect of Prey
                                        ~1 | Obs_ID), # this is needed
                          mods = ~  logpreymass,
                          # control=list(optimizer="Nelder-Mead"),
                          data =  dat_pp,
                          test = "t",
                          sparse = TRUE,
                          R = list(Predator = cor1_pp, Prey = cor2_pp)
)
summary(mod_sub_mass)

Multivariate Meta-Analysis Model (k = 480; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-527.7579  1055.5158  1071.5158  1104.8727  1071.8229   

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0298  0.1725     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0001     33     no   Predator  yes 
sigma^2.3  0.0599  0.2448     33     no  Predator2   no 
sigma^2.4  0.0727  0.2696    106     no       Prey  yes 
sigma^2.5  0.0119  0.1091    106     no      Prey2   no 
sigma^2.6  0.3314  0.5756    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5466.9065, p-val < .0001

Test of Moderators (coefficient 2):
F(df1 = 1, df2 = 478) = 5.2601, p-val = 0.0223

Model Results:

             estimate      se     tval   df    pval    ci.lb    ci.ub    
intrcpt       -0.7338  0.3626  -2.0237  478  0.0436  -1.4463  -0.0213  * 
logpreymass    0.0836  0.0365   2.2935  478  0.0223   0.0120   0.1553  * 

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
lim_bubble2 <- orchaRd::mod_results(mod_sub_mass, mod = "logpreymass", group = "Study_ID", weights = "prop")



submass <- orchaRd::bubble_plot(lim_bubble2, mod = "logpreymass", group = "Study_ID", xlab = "Subordinate log body mass ",
                                 ylab = "Change in temporal overlap", legend.pos = "top.left")

submass

3.5 Dominant body mass

Code
mod_dom_mass <- rma.mv(yi = overlap_diff_logit, V = vcv_pp,
                          random = list(~1 | Study_ID,
                                        ~1 | Predator, # phylo effect of Predactor
                                        ~1 | Predator2, # non-phylo effect 
                                        ~1 | Prey, # phylo effect of Prey
                                        ~1 | Prey2, # non-phylo effect of Prey
                                        ~1 | Obs_ID), # this is needed
                          mods = ~  logpredmass,
                          # control=list(optimizer="Nelder-Mead"),
                          data =  dat_pp,
                          test = "t",
                          sparse = TRUE,
                          R = list(Predator = cor1_pp, Prey = cor2_pp)
)
summary(mod_dom_mass)

Multivariate Meta-Analysis Model (k = 480; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-527.5438  1055.0876  1071.0876  1104.4445  1071.3947   

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0273  0.1653     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0000     33     no   Predator  yes 
sigma^2.3  0.0310  0.1759     33     no  Predator2   no 
sigma^2.4  0.0656  0.2561    106     no       Prey  yes 
sigma^2.5  0.0248  0.1576    106     no      Prey2   no 
sigma^2.6  0.3349  0.5787    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5533.2553, p-val < .0001

Test of Moderators (coefficient 2):
F(df1 = 1, df2 = 478) = 6.3714, p-val = 0.0119

Model Results:

             estimate      se     tval   df    pval    ci.lb    ci.ub    
intrcpt        1.0874  0.4512   2.4100  478  0.0163   0.2008   1.9739  * 
logpredmass   -0.1082  0.0429  -2.5242  478  0.0119  -0.1924  -0.0240  * 

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
lim_bubble2 <- orchaRd::mod_results(mod_dom_mass, mod = "logpredmass", group = "Study_ID", weights = "prop")



dommass <- orchaRd::bubble_plot(lim_bubble2, mod = "logpredmass", group = "Study_ID", xlab = "Dominant log body mass",
                                 ylab = "Change in temporal overlap", legend.pos = "top.left")

dommass

3.6 Body mass ratio

Code
mod_ratio <- rma.mv(yi = overlap_diff_logit, V = vcv_pp,
                          random = list(~1 | Study_ID,
                                        ~1 | Predator, # phylo effect of Predactor
                                        ~1 | Predator2, # non-phylo effect 
                                        ~1 | Prey, # phylo effect of Prey
                                        ~1 | Prey2, # non-phylo effect of Prey
                                        ~1 | Obs_ID), # this is needed
                          mods = ~  ratio,
                          # control=list(optimizer="Nelder-Mead"),
                          data =  dat_pp,
                          test = "t",
                          sparse = TRUE,
                          R = list(Predator = cor1_pp, Prey = cor2_pp)
)
saveRDS(mod_ratio, here("R", "Outputs", "mod_ratio.Rds"))
summary(mod_ratio)

Multivariate Meta-Analysis Model (k = 480; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-524.1387  1048.2773  1064.2773  1097.6342  1064.5843   

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0255  0.1597     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0000     33     no   Predator  yes 
sigma^2.3  0.0329  0.1815     33     no  Predator2   no 
sigma^2.4  0.0814  0.2853    106     no       Prey  yes 
sigma^2.5  0.0106  0.1032    106     no      Prey2   no 
sigma^2.6  0.3324  0.5765    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5480.6234, p-val < .0001

Test of Moderators (coefficient 2):
F(df1 = 1, df2 = 478) = 13.4813, p-val = 0.0003

Model Results:

         estimate      se     tval   df    pval    ci.lb    ci.ub      
intrcpt    1.1825  0.3545   3.3354  478  0.0009   0.4859   1.8792  *** 
ratio     -1.0271  0.2797  -3.6717  478  0.0003  -1.5768  -0.4774  *** 

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
lim_bubble2 <- orchaRd::mod_results(mod_ratio, mod = "ratio", group = "Study_ID", weights = "prop")



ratiomass <- orchaRd::bubble_plot(lim_bubble2, mod = "ratio", group = "Study_ID", xlab = "Pred/prey body mass ratio",
                                 ylab = "Change in temporal overlap", legend.pos = "top.left")

ratiomass

3.7 Deep learning interaction strength

Code
mod1_int <- rma.mv(yi = overlap_diff_logit, V = vcv_pp,
                    random = list(~1 | Study_ID,
                                  ~1 | Predator, # phylo effect of Predactor
                                  ~1 | Predator2, # non-phylo effect 
                                  ~1 | Prey, # phylo effect of Prey
                                  ~1 | Prey2, # non-phylo effect of Prey
                                  ~1 | Obs_ID), # this is needed
                    mods = ~  pred_deep_learning,
                    data =  dat_pp,
                    test = "t",
                    sparse = TRUE,
                    R = list(Predator = cor1_pp, Prey = cor2_pp)
)


summary(mod1_int)

Multivariate Meta-Analysis Model (k = 480; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-530.6334  1061.2667  1077.2667  1110.6236  1077.5738   

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0285  0.1688     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0001     33     no   Predator  yes 
sigma^2.3  0.0477  0.2183     33     no  Predator2   no 
sigma^2.4  0.0597  0.2444    106     no       Prey  yes 
sigma^2.5  0.0195  0.1398    106     no      Prey2   no 
sigma^2.6  0.3384  0.5817    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5544.5710, p-val < .0001

Test of Moderators (coefficient 2):
F(df1 = 1, df2 = 478) = 0.0000, p-val = 0.9959

Model Results:

                    estimate      se     tval   df    pval    ci.lb   ci.ub    
intrcpt               0.0141  0.1577   0.0897  478  0.9286  -0.2958  0.3241    
pred_deep_learning   -0.0006  0.1174  -0.0051  478  0.9959  -0.2314  0.2302    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
mod1_int

Multivariate Meta-Analysis Model (k = 480; method: REML)

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0285  0.1688     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0001     33     no   Predator  yes 
sigma^2.3  0.0477  0.2183     33     no  Predator2   no 
sigma^2.4  0.0597  0.2444    106     no       Prey  yes 
sigma^2.5  0.0195  0.1398    106     no      Prey2   no 
sigma^2.6  0.3384  0.5817    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5544.5710, p-val < .0001

Test of Moderators (coefficient 2):
F(df1 = 1, df2 = 478) = 0.0000, p-val = 0.9959

Model Results:

                    estimate      se     tval   df    pval    ci.lb   ci.ub    
intrcpt               0.0141  0.1577   0.0897  478  0.9286  -0.2958  0.3241    
pred_deep_learning   -0.0006  0.1174  -0.0051  478  0.9959  -0.2314  0.2302    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

3.8 GLM interaction strength

Code
mod2_int <- rma.mv(yi = overlap_diff_logit, V = vcv_pp,
                   random = list(~1 | Study_ID,
                                 ~1 | Predator, # phylo effect of Predactor
                                 ~1 | Predator2, # non-phylo effect 
                                 ~1 | Prey, # phylo effect of Prey
                                 ~1 | Prey2, # non-phylo effect of Prey
                                 ~1 | Obs_ID), # this is needed
                   mods = ~ pred_glm,
                   data =  dat_pp,
                   test = "t",
                   sparse = TRUE,
                   R = list(Predator = cor1_pp, Prey = cor2_pp)
)


summary(mod2_int)

Multivariate Meta-Analysis Model (k = 480; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-530.7453  1061.4907  1077.4907  1110.8476  1077.7977   

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0281  0.1678     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0001     33     no   Predator  yes 
sigma^2.3  0.0473  0.2176     33     no  Predator2   no 
sigma^2.4  0.0592  0.2434    106     no       Prey  yes 
sigma^2.5  0.0188  0.1370    106     no      Prey2   no 
sigma^2.6  0.3388  0.5820    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5429.9698, p-val < .0001

Test of Moderators (coefficient 2):
F(df1 = 1, df2 = 478) = 0.1588, p-val = 0.6905

Model Results:

          estimate      se     tval   df    pval    ci.lb   ci.ub    
intrcpt     0.1144  0.2904   0.3939  478  0.6938  -0.4563  0.6851    
pred_glm   -0.1091  0.2738  -0.3984  478  0.6905  -0.6471  0.4289    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
mod2_int

Multivariate Meta-Analysis Model (k = 480; method: REML)

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0281  0.1678     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0001     33     no   Predator  yes 
sigma^2.3  0.0473  0.2176     33     no  Predator2   no 
sigma^2.4  0.0592  0.2434    106     no       Prey  yes 
sigma^2.5  0.0188  0.1370    106     no      Prey2   no 
sigma^2.6  0.3388  0.5820    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5429.9698, p-val < .0001

Test of Moderators (coefficient 2):
F(df1 = 1, df2 = 478) = 0.1588, p-val = 0.6905

Model Results:

          estimate      se     tval   df    pval    ci.lb   ci.ub    
intrcpt     0.1144  0.2904   0.3939  478  0.6938  -0.4563  0.6851    
pred_glm   -0.1091  0.2738  -0.3984  478  0.6905  -0.6471  0.4289    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
#Parwise nocturnality calculations

dat_pp$Pair_noc <- dat_pp$NocturnalPrey +  dat_pp$NocturnalPred 

dat_pp$Pair_dir <- dat_pp$DiurnalPrey +  dat_pp$DiurnalPred 

dat_pp$Pair_crep <- dat_pp$CrepuscularPrey +  dat_pp$CrepuscularPred


dat_pp <- dat_pp %>%
  mutate(Nocturnal = case_when(
    Pair_noc > 1 ~ "Nocturnal",
    TRUE ~ "Not"
  ))

dat_pp <- dat_pp %>%
  mutate(Diurnal = case_when(
    Pair_dir > 1 ~ "Diurnal",
    TRUE ~ "Not"
  ))

dat_pp <- dat_pp %>%
  mutate(Crepuscular = case_when(
    Pair_crep > 1 ~ "Crepuscular",
    TRUE ~ "Not"
  ))

3.9 Nocturnal pair

Code
  mod_noctprey <- rma.mv(yi = overlap_diff_logit, V = vcv_pp,
                    random = list(~1 | Study_ID,
                                  ~1 | Predator, # phylo effect of Predactor
                                  ~1 | Predator2, # non-phylo effect 
                                  ~1 | Prey, # phylo effect of Prey
                                  ~1 | Prey2, # non-phylo effect of Prey
                                  ~1 | Obs_ID), # this is needed
                    mods = ~Nocturnal  -1,
                    data =  dat_pp,
                    test = "t",
                    sparse = TRUE,
                    R = list(Predator = cor1_pp, Prey = cor2_pp)
)
summary(mod_noctprey)

Multivariate Meta-Analysis Model (k = 480; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-529.1360  1058.2719  1074.2719  1107.6288  1074.5790   

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0283  0.1682     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0000     33     no   Predator  yes 
sigma^2.3  0.0521  0.2283     33     no  Predator2   no 
sigma^2.4  0.0383  0.1957    106     no       Prey  yes 
sigma^2.5  0.0180  0.1343    106     no      Prey2   no 
sigma^2.6  0.3369  0.5804    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5249.5025, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 478) = 1.6259, p-val = 0.1978

Model Results:

                    estimate      se     tval   df    pval    ci.lb   ci.ub    
NocturnalNocturnal   -0.0271  0.1306  -0.2076  478  0.8357  -0.2838  0.2296    
NocturnalNot          0.1695  0.1534   1.1052  478  0.2696  -0.1319  0.4709    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
mod_noctprey

Multivariate Meta-Analysis Model (k = 480; method: REML)

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0283  0.1682     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0000     33     no   Predator  yes 
sigma^2.3  0.0521  0.2283     33     no  Predator2   no 
sigma^2.4  0.0383  0.1957    106     no       Prey  yes 
sigma^2.5  0.0180  0.1343    106     no      Prey2   no 
sigma^2.6  0.3369  0.5804    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5249.5025, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 478) = 1.6259, p-val = 0.1978

Model Results:

                    estimate      se     tval   df    pval    ci.lb   ci.ub    
NocturnalNocturnal   -0.0271  0.1306  -0.2076  478  0.8357  -0.2838  0.2296    
NocturnalNot          0.1695  0.1534   1.1052  478  0.2696  -0.1319  0.4709    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
noct <- orchard_plot(mod_noctprey, by = "Nocturnal", xlab = "Difference in overlap (logit)", group = "Study_ID")

noct

3.10 Crepuscular pair

Code
mod_crepprey <- rma.mv(yi = overlap_diff_logit, V = vcv_pp,
                     random = list(~1 | Study_ID,
                                   ~1 | Predator, # phylo effect of Predactor
                                   ~1 | Predator2, # non-phylo effect 
                                   ~1 | Prey, # phylo effect of Prey
                                   ~1 | Prey2, # non-phylo effect of Prey
                                   ~1 | Obs_ID), # this is needed
                     mods = ~  Crepuscular  -1,
                     data =  dat_pp,
                     # control=list(optimizer="BFGS"),
                     test = "t",
                     sparse = TRUE,
                     R = list(Predator = cor1_pp, Prey = cor2_pp)
)


summary(mod_crepprey)

Multivariate Meta-Analysis Model (k = 480; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-528.7313  1057.4625  1073.4625  1106.8194  1073.7696   

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0278  0.1669     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0000     33     no   Predator  yes 
sigma^2.3  0.0485  0.2203     33     no  Predator2   no 
sigma^2.4  0.0583  0.2414    106     no       Prey  yes 
sigma^2.5  0.0224  0.1498    106     no      Prey2   no 
sigma^2.6  0.3336  0.5776    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5483.1175, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 478) = 1.9051, p-val = 0.1499

Model Results:

                        estimate      se     tval   df    pval    ci.lb   ci.ub 
CrepuscularCrepuscular    0.1219  0.1556   0.7829  478  0.4341  -0.1840  0.4277 
CrepuscularNot           -0.0542  0.1493  -0.3628  478  0.7169  -0.3476  0.2393 
                          
CrepuscularCrepuscular    
CrepuscularNot            

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
mod_crepprey

Multivariate Meta-Analysis Model (k = 480; method: REML)

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0278  0.1669     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0000     33     no   Predator  yes 
sigma^2.3  0.0485  0.2203     33     no  Predator2   no 
sigma^2.4  0.0583  0.2414    106     no       Prey  yes 
sigma^2.5  0.0224  0.1498    106     no      Prey2   no 
sigma^2.6  0.3336  0.5776    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5483.1175, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 478) = 1.9051, p-val = 0.1499

Model Results:

                        estimate      se     tval   df    pval    ci.lb   ci.ub 
CrepuscularCrepuscular    0.1219  0.1556   0.7829  478  0.4341  -0.1840  0.4277 
CrepuscularNot           -0.0542  0.1493  -0.3628  478  0.7169  -0.3476  0.2393 
                          
CrepuscularCrepuscular    
CrepuscularNot            

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
crep <- orchard_plot(mod_crepprey, by = "Crepuscular", xlab = "logit(overlap %)", group = "Study_ID")

crep

3.11 Diurnal pair

Code
mod_diprey <- rma.mv(yi = overlap_diff_logit, V = vcv_pp,
                       random = list(~1 | Study_ID,
                                     ~1 | Predator, # phylo effect of Predactor
                                     ~1 | Predator2, # non-phylo effect 
                                     ~1 | Prey, # phylo effect of Prey
                                     ~1 | Prey2, # non-phylo effect of Prey
                                     ~1 | Obs_ID), # this is needed
                       mods = ~  Diurnal  -1,
                       data =  dat_pp,
                       test = "t",
                       sparse = TRUE,
                       R = list(Predator = cor1_pp, Prey = cor2_pp)
)


summary(mod_diprey)

Multivariate Meta-Analysis Model (k = 480; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-525.9781  1051.9561  1067.9561  1101.3130  1068.2631   

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0300  0.1732     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0001     33     no   Predator  yes 
sigma^2.3  0.0424  0.2059     33     no  Predator2   no 
sigma^2.4  0.0696  0.2637    106     no       Prey  yes 
sigma^2.5  0.0146  0.1210    106     no      Prey2   no 
sigma^2.6  0.3299  0.5743    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5448.8781, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 478) = 4.9760, p-val = 0.0073

Model Results:

                estimate      se     tval   df    pval    ci.lb   ci.ub    
DiurnalDiurnal    0.3870  0.1924   2.0108  478  0.0449   0.0088  0.7651  * 
DiurnalNot       -0.0288  0.1531  -0.1879  478  0.8510  -0.3296  0.2720    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
mod_diprey

Multivariate Meta-Analysis Model (k = 480; method: REML)

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0300  0.1732     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0001     33     no   Predator  yes 
sigma^2.3  0.0424  0.2059     33     no  Predator2   no 
sigma^2.4  0.0696  0.2637    106     no       Prey  yes 
sigma^2.5  0.0146  0.1210    106     no      Prey2   no 
sigma^2.6  0.3299  0.5743    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5448.8781, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 478) = 4.9760, p-val = 0.0073

Model Results:

                estimate      se     tval   df    pval    ci.lb   ci.ub    
DiurnalDiurnal    0.3870  0.1924   2.0108  478  0.0449   0.0088  0.7651  * 
DiurnalNot       -0.0288  0.1531  -0.1879  478  0.8510  -0.3296  0.2720    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
diur <- orchard_plot(mod_diprey, by = "Diurnal", xlab = "logit(overlap %)", group = "Study_ID")

diur

4 Meta-regression:Uni-moderator single species

4.1 Reversed overlap metric (1-overlap giving us the difference in activity)

Code
mod1_phylo2 <- rma.mv(yi = overlap_rev_logit, V = vcv_sp,
                      random = list(~1 | Study_ID,
                                    ~1 | Species_tree, # phylo effect 
                                    ~1 | Species_tree2, # non-phylo effect 
                                    ~1 | Obs_ID), # this is needed
                      mods = ~treatment -1,
                      data =  dat_sp,
                      test = "t",
                      sparse = TRUE,
                      R = list(Species_tree = cor1_sp)
)

summary(mod1_phylo2)

Multivariate Meta-Analysis Model (k = 256; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-286.0226   572.0452   584.0452   605.2692   584.3853   

Variance Components:

            estim    sqrt  nlvls  fixed         factor    R 
sigma^2.1  0.2253  0.4747     32     no       Study_ID   no 
sigma^2.2  0.0000  0.0002     82     no   Species_tree  yes 
sigma^2.3  0.1226  0.3501     82     no  Species_tree2   no 
sigma^2.4  0.2985  0.5464    256     no         Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 254) = 4638.1850, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 254) = 107.0639, p-val < .0001

Model Results:

                   estimate      se      tval   df    pval    ci.lb    ci.ub 
treatmentPredator   -1.6815  0.1353  -12.4283  254  <.0001  -1.9480  -1.4151 
treatmentPrey       -1.7618  0.1227  -14.3625  254  <.0001  -2.0034  -1.5203 
                       
treatmentPredator  *** 
treatmentPrey      *** 

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
sp_plot_rev <- orchard_plot(mod1_phylo2, mod = "treatment", 
                            transfm ="invlogit", 
                            xlab = "Proportional change in activity", group = "Study_ID")
sp_plot_rev

5 Meta-regression:multi-moderator single species

5.1 Subordinate and dominant disturbance type

Code
mod2_phyloprey <- rma.mv(yi = overlap_rev_logit, V = vcvherb_sp,
                                 random = list(~1 | Study_ID,
                                               ~1 | Species_tree, # phylo effect 
                                               ~1 | Species_tree2, # non-phylo effect 
                                               ~1 | Obs_ID), # this is needed
                                 mods = ~ Disturbance_type -1 ,
                                 data =  herb_sp,
                                 test = "t",
                                 sparse = TRUE,
                                 R = list(Species_tree = cor1_sp)
)

summary(mod2_phyloprey)

Multivariate Meta-Analysis Model (k = 152; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-180.0145   360.0289   384.0289   419.6667   386.4106   

Variance Components:

            estim    sqrt  nlvls  fixed         factor    R 
sigma^2.1  0.3138  0.5602     31     no       Study_ID   no 
sigma^2.2  0.0000  0.0001     73     no   Species_tree  yes 
sigma^2.3  0.0803  0.2834     73     no  Species_tree2   no 
sigma^2.4  0.4285  0.6546    152     no         Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 144) = 3667.9222, p-val < .0001

Test of Moderators (coefficients 1:8):
F(df1 = 8, df2 = 144) = 21.7006, p-val < .0001

Model Results:

                                     estimate      se     tval   df    pval 
Disturbance_typeAgregate              -2.0016  0.4193  -4.7732  144  <.0001 
Disturbance_typeAgriculture           -1.4739  0.3041  -4.8475  144  <.0001 
Disturbance_typeHabitat loss          -1.7566  0.5921  -2.9668  144  0.0035 
Disturbance_typeHuman_presence        -1.9364  0.2040  -9.4944  144  <.0001 
Disturbance_typePredator_control      -1.6730  0.3361  -4.9784  144  <.0001 
Disturbance_typeProtected area        -1.7146  0.9957  -1.7220  144  0.0872 
Disturbance_typeResource_extraction   -2.1758  0.9999  -2.1761  144  0.0312 
Disturbance_typeUrbanisation          -1.8785  0.3200  -5.8706  144  <.0001 
                                       ci.lb    ci.ub      
Disturbance_typeAgregate             -2.8304  -1.1727  *** 
Disturbance_typeAgriculture          -2.0749  -0.8729  *** 
Disturbance_typeHabitat loss         -2.9268  -0.5863   ** 
Disturbance_typeHuman_presence       -2.3395  -1.5333  *** 
Disturbance_typePredator_control     -2.3372  -1.0088  *** 
Disturbance_typeProtected area       -3.6826   0.2534    . 
Disturbance_typeResource_extraction  -4.1521  -0.1995    * 
Disturbance_typeUrbanisation         -2.5110  -1.2460  *** 

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
mod2prey <- orchard_plot(mod2_phyloprey, mod = "Disturbance_type", 
                            transfm ="invlogit", 
                            xlab = "Proportional change in activity\n(subordinate)", group = "Study_ID", angle = 45)
mod2prey

Code
#pred
mod2_phylopred <- rma.mv(yi = overlap_rev_logit, V = vcvpred_sp,
                         random = list(~1 | Study_ID,
                                       ~1 | Species_tree, # phylo effect 
                                       ~1 | Species_tree2, # non-phylo effect 
                                       ~1 | Obs_ID), # this is needed
                         mods = ~ Disturbance_type -1 ,
                         data =  pred_sp,
                         test = "t",
                         sparse = TRUE,
                         R = list(Species_tree = cor1_sp)
)

summary(mod2_phylopred)

Multivariate Meta-Analysis Model (k = 104; method: REML)

  logLik  Deviance       AIC       BIC      AICc   
-97.8270  195.6541  219.6541  250.4263  223.4131   

Variance Components:

            estim    sqrt  nlvls  fixed         factor    R 
sigma^2.1  0.1941  0.4405     31     no       Study_ID   no 
sigma^2.2  0.1958  0.4425     27     no   Species_tree  yes 
sigma^2.3  0.0694  0.2634     27     no  Species_tree2   no 
sigma^2.4  0.1736  0.4167    104     no         Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 96) = 626.1834, p-val < .0001

Test of Moderators (coefficients 1:8):
F(df1 = 8, df2 = 96) = 4.2068, p-val = 0.0002

Model Results:

                                     estimate      se     tval  df    pval 
Disturbance_typeAgregate              -1.6574  0.4649  -3.5651  96  0.0006 
Disturbance_typeAgriculture           -1.7070  0.3926  -4.3485  96  <.0001 
Disturbance_typeHabitat loss          -1.6973  0.5324  -3.1877  96  0.0019 
Disturbance_typeHuman_presence        -1.9237  0.3608  -5.3325  96  <.0001 
Disturbance_typePredator_control      -1.6720  0.4335  -3.8573  96  0.0002 
Disturbance_typeProtected area        -0.7937  0.7088  -1.1197  96  0.2656 
Disturbance_typeResource_extraction   -2.7571  0.8920  -3.0910  96  0.0026 
Disturbance_typeUrbanisation          -1.8636  0.4110  -4.5338  96  <.0001 
                                       ci.lb    ci.ub      
Disturbance_typeAgregate             -2.5802  -0.7346  *** 
Disturbance_typeAgriculture          -2.4862  -0.9278  *** 
Disturbance_typeHabitat loss         -2.7542  -0.6404   ** 
Disturbance_typeHuman_presence       -2.6398  -1.2077  *** 
Disturbance_typePredator_control     -2.5324  -0.8116  *** 
Disturbance_typeProtected area       -2.2008   0.6133      
Disturbance_typeResource_extraction  -4.5277  -0.9866   ** 
Disturbance_typeUrbanisation         -2.6795  -1.0477  *** 

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
mod2pred <- orchard_plot(mod2_phylopred, mod = "Disturbance_type", 
                         transfm ="invlogit", 
                         xlab = "Proportional change in activity\n(dominant)", group = "Study_ID", angle = 45)
mod2pred

5.2 Nocturnal

Code
func_mod2 <- rma.mv(yi = overlap_rev_logit, V = vcvherb_sp,
                       random = list(~1 | Study_ID,
                                     ~1 | Species_tree, # phylo effect 
                                     ~1 | Species_tree2, # non-phylo effect 
                                     ~1 | Obs_ID), # this is needed
                       mods = ~ Nocturnal_cat -1
                       ,
                       data =  herb_sp,
                       test = "t",
                       sparse = TRUE,
                       R = list(Species_tree = cor1_sp)
)

summary(func_mod2)

Multivariate Meta-Analysis Model (k = 152; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-188.4229   376.8459   388.8459   406.9097   389.4333   

Variance Components:

            estim    sqrt  nlvls  fixed         factor    R 
sigma^2.1  0.2341  0.4839     31     no       Study_ID   no 
sigma^2.2  0.0000  0.0001     73     no   Species_tree  yes 
sigma^2.3  0.0939  0.3064     73     no  Species_tree2   no 
sigma^2.4  0.4250  0.6519    152     no         Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 150) = 3897.4793, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 150) = 97.6145, p-val < .0001

Model Results:

                        estimate      se      tval   df    pval    ci.lb 
Nocturnal_catNocturnal   -1.8399  0.1345  -13.6820  150  <.0001  -2.1056 
Nocturnal_catNot         -1.7259  0.2261   -7.6334  150  <.0001  -2.1726 
                          ci.ub      
Nocturnal_catNocturnal  -1.5742  *** 
Nocturnal_catNot        -1.2791  *** 

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
noct_herb <- orchard_plot(func_mod2, mod = "Nocturnal_cat", transfm ="invlogit", 
                            xlab = "Proportional change in activity (subordinate)", group = "Study_ID", by = "Nocturnal_cat")

noct_herb

Code
func_mod2_pred <- rma.mv(yi = overlap_rev_logit, V = vcvpred_sp,
                    random = list(~1 | Study_ID,
                                  ~1 | Species_tree, # phylo effect 
                                  ~1 | Species_tree2, # non-phylo effect 
                                  ~1 | Obs_ID), # this is needed
                    mods = ~ Nocturnal_cat -1
                    ,
                    data =  pred_sp,
                    test = "t",
                    sparse = TRUE,
                    R = list(Species_tree = cor1_sp)
)

summary(func_mod2_pred)

Multivariate Meta-Analysis Model (k = 104; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-105.3264   210.6529   222.6529   238.4027   223.5371   

Variance Components:

            estim    sqrt  nlvls  fixed         factor    R 
sigma^2.1  0.1599  0.3999     31     no       Study_ID   no 
sigma^2.2  0.1860  0.4313     27     no   Species_tree  yes 
sigma^2.3  0.0829  0.2880     27     no  Species_tree2   no 
sigma^2.4  0.1696  0.4119    104     no         Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 102) = 632.9781, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 102) = 14.7962, p-val < .0001

Model Results:

                        estimate      se     tval   df    pval    ci.lb 
Nocturnal_catNocturnal   -1.7736  0.3335  -5.3185  102  <.0001  -2.4350 
Nocturnal_catNot         -1.9844  0.4364  -4.5471  102  <.0001  -2.8499 
                          ci.ub      
Nocturnal_catNocturnal  -1.1121  *** 
Nocturnal_catNot        -1.1188  *** 

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
noct_pred <- orchard_plot(func_mod2, mod = "Nocturnal_cat", transfm ="invlogit", 
                            xlab = "Proportional change in activity  (dominant)", group = "Study_ID", by = "Nocturnal_cat")

noct_pred

5.3 Crepuscular

Code
func_mod3 <- rma.mv(yi = overlap_rev_logit, V = vcvherb_sp,
                       random = list(~1 | Study_ID,
                                     ~1 | Species_tree, # phylo effect 
                                     ~1 | Species_tree2, # non-phylo effect 
                                     ~1 | Obs_ID), # this is needed
                       mods = ~ Crepuscular_cat -1
                       ,
                       data =  herb_sp,
                       test = "t",
                       sparse = TRUE,
                       R = list(Species_tree = cor1_sp)
)

summary(func_mod3)

Multivariate Meta-Analysis Model (k = 152; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-188.4565   376.9129   388.9129   406.9767   389.5003   

Variance Components:

            estim    sqrt  nlvls  fixed         factor    R 
sigma^2.1  0.2440  0.4940     31     no       Study_ID   no 
sigma^2.2  0.0000  0.0002     73     no   Species_tree  yes 
sigma^2.3  0.0896  0.2993     73     no  Species_tree2   no 
sigma^2.4  0.4261  0.6527    152     no         Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 150) = 3879.2943, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 150) = 96.1871, p-val < .0001

Model Results:

                            estimate      se      tval   df    pval    ci.lb 
Crepuscular_catCrepuscular   -1.8200  0.1443  -12.6109  150  <.0001  -2.1052 
Crepuscular_catNot           -1.8342  0.1675  -10.9538  150  <.0001  -2.1651 
                              ci.ub      
Crepuscular_catCrepuscular  -1.5348  *** 
Crepuscular_catNot          -1.5033  *** 

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
crep_herb <- orchard_plot(func_mod3, mod = "Crepuscular_cat", transfm ="invlogit", 
                            xlab = "Proportional change in activity (subordinate)", group = "Study_ID")

crep_herb

Code
func_mod3_pred <- rma.mv(yi = overlap_rev_logit, V = vcvpred_sp,
                    random = list(~1 | Study_ID,
                                  ~1 | Species_tree, # phylo effect 
                                  ~1 | Species_tree2, # non-phylo effect 
                                  ~1 | Obs_ID), # this is needed
                    mods = ~ Crepuscular_cat -1
                    ,
                    data =  pred_sp,
                    test = "t",
                    sparse = TRUE,
                    R = list(Species_tree = cor1_sp)
)

summary(func_mod3_pred)

Multivariate Meta-Analysis Model (k = 104; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-105.5103   211.0207   223.0207   238.7705   223.9049   

Variance Components:

            estim    sqrt  nlvls  fixed         factor    R 
sigma^2.1  0.1562  0.3952     31     no       Study_ID   no 
sigma^2.2  0.1620  0.4025     27     no   Species_tree  yes 
sigma^2.3  0.0917  0.3027     27     no  Species_tree2   no 
sigma^2.4  0.1694  0.4116    104     no         Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 102) = 629.1737, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 102) = 16.0760, p-val < .0001

Model Results:

                            estimate      se     tval   df    pval    ci.lb 
Crepuscular_catCrepuscular   -1.7383  0.3310  -5.2511  102  <.0001  -2.3949 
Crepuscular_catNot           -1.8386  0.3328  -5.5248  102  <.0001  -2.4987 
                              ci.ub      
Crepuscular_catCrepuscular  -1.0817  *** 
Crepuscular_catNot          -1.1785  *** 

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
crep_pred <- orchard_plot(func_mod3_pred, mod = "Crepuscular_cat", transfm ="invlogit", 
                            xlab = "Proportional change in activity  (dominant)", group = "Study_ID")

crep_pred

5.4 Diurnal

Code
func_mod4 <- rma.mv(yi = overlap_rev_logit, V = vcvherb_sp,
                       random = list(~1 | Study_ID,
                                     ~1 | Species_tree, # phylo effect 
                                     ~1 | Species_tree2, # non-phylo effect 
                                     ~1 | Obs_ID), # this is needed
                       mods = ~ Diurnal_cat -1
                       ,
                       data =  herb_sp,
                       test = "t",
                       sparse = TRUE,
                       R = list(Species_tree = cor1_sp)
)

summary(func_mod4)

Multivariate Meta-Analysis Model (k = 152; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-188.4003   376.8006   388.8006   406.8644   389.3880   

Variance Components:

            estim    sqrt  nlvls  fixed         factor    R 
sigma^2.1  0.2367  0.4865     31     no       Study_ID   no 
sigma^2.2  0.0000  0.0001     73     no   Species_tree  yes 
sigma^2.3  0.0933  0.3055     73     no  Species_tree2   no 
sigma^2.4  0.4246  0.6516    152     no         Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 150) = 3886.9861, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 150) = 97.2006, p-val < .0001

Model Results:

                    estimate      se      tval   df    pval    ci.lb    ci.ub 
Diurnal_catDiurnal   -1.7642  0.1724  -10.2333  150  <.0001  -2.1048  -1.4235 
Diurnal_catNot       -1.8509  0.1410  -13.1261  150  <.0001  -2.1296  -1.5723 
                        
Diurnal_catDiurnal  *** 
Diurnal_catNot      *** 

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
di_herb <- orchard_plot(func_mod4, mod = "Diurnal_cat", transfm ="invlogit", 
                            xlab = "Proportional change in activity (subordinate)", group = "Study_ID")

di_herb

Code
func_mod4_pred <- rma.mv(yi = overlap_rev_logit, V = vcvpred_sp,
                    random = list(~1 | Study_ID,
                                  ~1 | Species_tree, # phylo effect 
                                  ~1 | Species_tree2, # non-phylo effect 
                                  ~1 | Obs_ID), # this is needed
                    mods = ~ Diurnal_cat -1
                    ,
                    data =  pred_sp,
                    test = "t",
                    sparse = TRUE,
                    R = list(Species_tree = cor1_sp)
)

summary(func_mod4_pred)

Multivariate Meta-Analysis Model (k = 104; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-105.0114   210.0228   222.0228   237.7726   222.9070   

Variance Components:

            estim    sqrt  nlvls  fixed         factor    R 
sigma^2.1  0.1524  0.3904     31     no       Study_ID   no 
sigma^2.2  0.1630  0.4037     27     no   Species_tree  yes 
sigma^2.3  0.0851  0.2917     27     no  Species_tree2   no 
sigma^2.4  0.1697  0.4120    104     no         Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 102) = 633.2576, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 102) = 16.5684, p-val < .0001

Model Results:

                    estimate      se     tval   df    pval    ci.lb    ci.ub 
Diurnal_catDiurnal   -1.6372  0.3467  -4.7218  102  <.0001  -2.3250  -0.9495 
Diurnal_catNot       -1.8575  0.3228  -5.7551  102  <.0001  -2.4976  -1.2173 
                        
Diurnal_catDiurnal  *** 
Diurnal_catNot      *** 

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
di_pred <- orchard_plot(func_mod4_pred, mod = "Diurnal_cat", transfm ="invlogit", 
                            xlab = "Proportional change in activity  (dominant)", group = "Study_ID")

di_pred

5.5 Body mass

Code
func_mod1_ss_cat_herb <- rma.mv(yi = overlap_rev_logit, V = vcvherb_sp,
                           random = list(~1 | Study_ID,
                                         ~1 | Species_tree, # phylo effect 
                                         ~1 | Species_tree2, # non-phylo effect 
                                         ~1 | Obs_ID), # this is needed
                           mods = ~logmass, 
                           data =  herb_sp,
                           test = "t",
                           sparse = TRUE,
                           R = list(Species_tree = cor1_sp)
)

summary(func_mod1_ss_cat_herb)

Multivariate Meta-Analysis Model (k = 152; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-187.5615   375.1229   387.1229   405.1868   387.7104   

Variance Components:

            estim    sqrt  nlvls  fixed         factor    R 
sigma^2.1  0.2168  0.4656     31     no       Study_ID   no 
sigma^2.2  0.0093  0.0964     73     no   Species_tree  yes 
sigma^2.3  0.0785  0.2802     73     no  Species_tree2   no 
sigma^2.4  0.4326  0.6577    152     no         Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 150) = 3890.3980, p-val < .0001

Test of Moderators (coefficient 2):
F(df1 = 1, df2 = 150) = 1.5718, p-val = 0.2119

Model Results:

         estimate      se     tval   df    pval    ci.lb    ci.ub      
intrcpt   -2.4408  0.5111  -4.7759  150  <.0001  -3.4506  -1.4310  *** 
logmass    0.0661  0.0527   1.2537  150  0.2119  -0.0381   0.1704      

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
lim_bubble2 <- orchaRd::mod_results(func_mod1_ss_cat_herb, mod = "logmass", group = "Study_ID", weights = "prop")

sub_mass_sp <- orchaRd::bubble_plot(lim_bubble2, mod = "logmass", group = "Study_ID", xlab = "Subordinate log body mass",
                                 ylab = "Proportional change in activity", legend.pos = "top.left")

sub_mass_sp

Code
func_mod1_ss_cat_pred <- rma.mv(yi = overlap_rev_logit, V = vcvpred_sp,
                           random = list(~1 | Study_ID,
                                         ~1 | Species_tree, # phylo effect 
                                         ~1 | Species_tree2, # non-phylo effect 
                                         ~1 | Obs_ID), # this is needed
                           mods = ~logmass, 
                           data =  pred_sp,
                           test = "t",
                           sparse = TRUE,
                           R = list(Species_tree = cor1_sp)
)

summary(func_mod1_ss_cat_pred)

Multivariate Meta-Analysis Model (k = 104; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-104.1906   208.3811   220.3811   236.1310   221.2653   

Variance Components:

            estim    sqrt  nlvls  fixed         factor    R 
sigma^2.1  0.1246  0.3530     31     no       Study_ID   no 
sigma^2.2  0.0345  0.1858     27     no   Species_tree  yes 
sigma^2.3  0.1010  0.3178     27     no  Species_tree2   no 
sigma^2.4  0.1766  0.4203    104     no         Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 102) = 612.6630, p-val < .0001

Test of Moderators (coefficient 2):
F(df1 = 1, df2 = 102) = 3.2009, p-val = 0.0766

Model Results:

         estimate      se     tval   df    pval    ci.lb    ci.ub      
intrcpt   -3.0238  0.7402  -4.0850  102  <.0001  -4.4920  -1.5556  *** 
logmass    0.1320  0.0738   1.7891  102  0.0766  -0.0143   0.2784    . 

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
lim_bubble2 <- orchaRd::mod_results(func_mod1_ss_cat_pred, mod = "logmass", group = "Study_ID", weights = "prop")

dom_mass_sp <- orchaRd::bubble_plot(lim_bubble2, mod = "logmass", group = "Study_ID", xlab = "Dominant log body mass",
                                 ylab = "Proportional change in activity", legend.pos = "top.left")

dom_mass_sp

6 Nocturnality meta-analysis (RR)

Code
mod1_noct <- rma.mv(yi = RR, V = vcv_noct,
                      random = list(~1 | Study_ID,
                                    ~1 | Species_tree, # phylo effect 
                                    ~1 | Species, # non-phylo effect 
                                    ~1 | Obs_ID), # this is needed
                      mods = ~treatment -1,
                      data =  dat_noct,
                      test = "t",
                      sparse = TRUE,
                      R = list(Species_tree = cor1_noct)
)

summary(mod1_noct)

Multivariate Meta-Analysis Model (k = 162; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-147.6697   295.3393   307.3393   325.7904   307.8883   

Variance Components:

            estim    sqrt  nlvls  fixed        factor    R 
sigma^2.1  0.0026  0.0511     19     no      Study_ID   no 
sigma^2.2  0.0000  0.0000     65     no  Species_tree  yes 
sigma^2.3  0.0000  0.0000     65     no       Species   no 
sigma^2.4  0.2642  0.5140    162     no        Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 160) = 8078.9745, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 160) = 0.4680, p-val = 0.6271

Model Results:

                   estimate      se    tval   df    pval    ci.lb   ci.ub    
treatmentPredator    0.0690  0.0736  0.9379  160  0.3497  -0.0763  0.2144    
treatmentPrey        0.0204  0.0574  0.3557  160  0.7225  -0.0930  0.1339    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
i2_ml(mod1_noct)
       I2_Total     I2_Study_ID I2_Species_tree      I2_Species       I2_Obs_ID 
   9.994164e+01    9.766378e-01    2.985398e-09    1.429298e-07    9.896501e+01 
Code
orchard_plot(mod1_noct, mod = "treatment", xlab = "logRR", group = "Study_ID", flip = FALSE)

7 Body mass

Code
func_mod1_cat_herbnoct <- rma.mv(yi = RR, V = vcvherb_noct,
                         random = list(~1 | Study_ID,
                                       ~1 | Species, # phylo effect 
                                       ~1 | Species_tree, # non-phylo effect 
                                       ~1 | Obs_ID), # this is needed
                         mods = ~  logmass,
                         data =  herbnoct,
                         test = "t",
                         sparse = TRUE,
                         R = list(Species = cor1_noct)
)

summary(func_mod1_cat_herbnoct)

Multivariate Meta-Analysis Model (k = 100; method: REML)

  logLik  Deviance       AIC       BIC      AICc   
-79.0921  158.1842  170.1842  185.6940  171.1072   

Variance Components:

            estim    sqrt  nlvls  fixed        factor    R 
sigma^2.1  0.0049  0.0703     19     no      Study_ID   no 
sigma^2.2  0.0000  0.0000     58     no       Species  yes 
sigma^2.3  0.0000  0.0000     58     no  Species_tree   no 
sigma^2.4  0.2346  0.4843    100     no        Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 98) = 5938.2638, p-val < .0001

Test of Moderators (coefficient 2):
F(df1 = 1, df2 = 98) = 0.9694, p-val = 0.3273

Model Results:

         estimate      se     tval  df    pval    ci.lb   ci.ub    
intrcpt    0.2798  0.2833   0.9879  98  0.3256  -0.2823  0.8420    
logmass   -0.0288  0.0293  -0.9846  98  0.3273  -0.0869  0.0293    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
lim_bubble2 <- orchaRd::mod_results(func_mod1_cat_herbnoct, mod = "logmass", group = "Study_ID", weights = "prop")

dom_mass_sp_noct <- orchaRd::bubble_plot(lim_bubble2, mod = "logmass", group = "Study_ID", xlab = "Dominant log body mass",
                                 ylab = "Nocturnality in response to disturbance (RR)", legend.pos = "top.left")

dom_mass_sp_noct

Code
func_mod1_cat_prednoct <- rma.mv(yi = RR, V = vcvpred_noct,
                         random = list(~1 | Study_ID,
                                       ~1 | Species, # phylo effect 
                                       ~1 | Species_tree, # non-phylo effect 
                                       ~1 | Obs_ID), # this is needed
                         mods = ~  logmass,
                         data =  prednoct,
                         test = "t",
                         sparse = TRUE,
                         R = list(Species = cor1_noct)
)

summary(func_mod1_cat_prednoct)

Multivariate Meta-Analysis Model (k = 62; method: REML)

  logLik  Deviance       AIC       BIC      AICc   
-65.7038  131.4076  143.4076  155.9736  144.9925   

Variance Components:

            estim    sqrt  nlvls  fixed        factor    R 
sigma^2.1  0.0000  0.0000     19     no      Study_ID   no 
sigma^2.2  0.0000  0.0000     22     no       Species  yes 
sigma^2.3  0.0000  0.0000     22     no  Species_tree   no 
sigma^2.4  0.3344  0.5783     62     no        Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 60) = 1534.0461, p-val < .0001

Test of Moderators (coefficient 2):
F(df1 = 1, df2 = 60) = 0.1048, p-val = 0.7473

Model Results:

         estimate      se     tval  df    pval    ci.lb   ci.ub    
intrcpt   -0.0912  0.5381  -0.1694  60  0.8660  -1.1675  0.9852    
logmass    0.0178  0.0551   0.3237  60  0.7473  -0.0924  0.1281    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
lim_bubble2 <- orchaRd::mod_results(func_mod1_cat_prednoct, mod = "logmass", group = "Study_ID", weights = "prop")

dom_mass_sp_noct <- orchaRd::bubble_plot(lim_bubble2, mod = "logmass", group = "Study_ID", xlab = "Dominant log body mass",
                                 ylab = "Nocturnality in response to disturbance (RR)", legend.pos = "top.left")

dom_mass_sp_noct

7.0.1 Nocturnal

Code
func_mod2_cat_herbnoct <- rma.mv(yi = RR, V = vcvherb_noct,
                         random = list(~1 | Study_ID,
                                       ~1 | Species, # phylo effect 
                                       ~1 | Species_tree, # non-phylo effect 
                                       ~1 | Obs_ID), # this is needed
                         mods = ~  Nocturnal_cat -1,
                         data =  herbnoct,
                         test = "t",
                         sparse = TRUE,
                         R = list(Species = cor1_noct)
)

summary(func_mod2_cat_herbnoct)

Multivariate Meta-Analysis Model (k = 100; method: REML)

  logLik  Deviance       AIC       BIC      AICc   
-79.2265  158.4530  170.4530  185.9628  171.3761   

Variance Components:

            estim    sqrt  nlvls  fixed        factor    R 
sigma^2.1  0.0138  0.1176     19     no      Study_ID   no 
sigma^2.2  0.0000  0.0000     58     no       Species  yes 
sigma^2.3  0.0000  0.0000     58     no  Species_tree   no 
sigma^2.4  0.2292  0.4787    100     no        Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 98) = 6561.8862, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 98) = 0.2055, p-val = 0.8146

Model Results:

                        estimate      se     tval  df    pval    ci.lb   ci.ub 
Nocturnal_catNocturnal   -0.0022  0.0637  -0.0346  98  0.9725  -0.1285  0.1241 
Nocturnal_catNot          0.1012  0.1617   0.6258  98  0.5329  -0.2197  0.4222 
                          
Nocturnal_catNocturnal    
Nocturnal_catNot          

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
catnoct2 <- orchard_plot(func_mod2_cat_herbnoct, mod = "Nocturnal_cat", xlab = "Nocturnality in response to disturbance (RR - subordinate)", group = "Study_ID",
                    flip = F)
catnoct2

Code
func_mod2_cat_prednoct <- rma.mv(yi = RR, V = vcvpred_noct,
                         random = list(~1 | Study_ID,
                                       ~1 | Species, # phylo effect 
                                       ~1 | Species_tree, # non-phylo effect 
                                       ~1 | Obs_ID), # this is needed
                         mods = ~  Nocturnal_cat -1,
                         data =  prednoct,
                         test = "t",
                         sparse = TRUE,
                         R = list(Species = cor1_noct)
)

summary(func_mod2_cat_prednoct)

Multivariate Meta-Analysis Model (k = 62; method: REML)

  logLik  Deviance       AIC       BIC      AICc   
-65.7724  131.5449  143.5449  156.1109  145.1298   

Variance Components:

            estim    sqrt  nlvls  fixed        factor    R 
sigma^2.1  0.0000  0.0000     19     no      Study_ID   no 
sigma^2.2  0.0000  0.0000     22     no       Species  yes 
sigma^2.3  0.0000  0.0000     22     no  Species_tree   no 
sigma^2.4  0.3363  0.5799     62     no        Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 60) = 1547.8706, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 60) = 0.5186, p-val = 0.5980

Model Results:

                        estimate      se    tval  df    pval    ci.lb   ci.ub 
Nocturnal_catNocturnal    0.0748  0.0856  0.8735  60  0.3859  -0.0965  0.2461 
Nocturnal_catNot          0.1336  0.2315  0.5771  60  0.5661  -0.3295  0.5966 
                          
Nocturnal_catNocturnal    
Nocturnal_catNot          

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
catnoctpred2 <- orchard_plot(func_mod2_cat_prednoct, mod = "Nocturnal_cat", xlab = "Nocturnality in response to disturbance (RR - dominant)", group = "Study_ID",
                    flip = F)
catnoctpred2

7.0.2 Crepusular

Code
func_mod3_cat_herbnoct <- rma.mv(yi = RR, V = vcvherb_noct,
                         random = list(~1 | Study_ID,
                                       ~1 | Species, # phylo effect 
                                       ~1 | Species_tree, # non-phylo effect 
                                       ~1 | Obs_ID), # this is needed
                         mods = ~  Crepuscular_cat -1,
                         data =  herbnoct,
                         test = "t",
                         sparse = TRUE,
                         R = list(Species = cor1_noct)
)

summary(func_mod3_cat_herbnoct)

Multivariate Meta-Analysis Model (k = 100; method: REML)

  logLik  Deviance       AIC       BIC      AICc   
-79.5230  159.0460  171.0460  186.5558  171.9691   

Variance Components:

            estim    sqrt  nlvls  fixed        factor    R 
sigma^2.1  0.0107  0.1033     19     no      Study_ID   no 
sigma^2.2  0.0000  0.0008     58     no       Species  yes 
sigma^2.3  0.0002  0.0128     58     no  Species_tree   no 
sigma^2.4  0.2319  0.4815    100     no        Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 98) = 6548.2029, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 98) = 0.0526, p-val = 0.9488

Model Results:

                            estimate      se     tval  df    pval    ci.lb 
Crepuscular_catCrepuscular   -0.0054  0.0727  -0.0746  98  0.9407  -0.1496 
Crepuscular_catNot            0.0264  0.0882   0.2989  98  0.7656  -0.1487 
                             ci.ub    
Crepuscular_catCrepuscular  0.1388    
Crepuscular_catNot          0.2015    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
catnoct3 <- orchard_plot(func_mod3_cat_herbnoct, mod = "Crepuscular_cat", xlab = "Nocturnality in response to disturbance (RR - subordinate)", group = "Study_ID",
                    flip = F)
catnoct3

Code
func_mod3_cat_prednoct <- rma.mv(yi = RR, V = vcvpred_noct,
                         random = list(~1 | Study_ID,
                                       ~1 | Species, # phylo effect 
                                       ~1 | Species_tree, # non-phylo effect 
                                       ~1 | Obs_ID), # this is needed
                         mods = ~  Crepuscular_cat -1,
                         data =  prednoct,
                         test = "t",
                         sparse = TRUE,
                         R = list(Species = cor1_noct)
)

summary(func_mod3_cat_prednoct)

Multivariate Meta-Analysis Model (k = 62; method: REML)

  logLik  Deviance       AIC       BIC      AICc   
-65.8040  131.6079  143.6079  156.1740  145.1928   

Variance Components:

            estim    sqrt  nlvls  fixed        factor    R 
sigma^2.1  0.0000  0.0000     19     no      Study_ID   no 
sigma^2.2  0.0000  0.0000     22     no       Species  yes 
sigma^2.3  0.0000  0.0000     22     no  Species_tree   no 
sigma^2.4  0.3337  0.5777     62     no        Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 60) = 1560.0270, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 60) = 0.5454, p-val = 0.5825

Model Results:

                            estimate      se    tval  df    pval    ci.lb 
Crepuscular_catCrepuscular    0.1001  0.1008  0.9938  60  0.3243  -0.1014 
Crepuscular_catNot            0.0489  0.1285  0.3807  60  0.7048  -0.2081 
                             ci.ub    
Crepuscular_catCrepuscular  0.3017    
Crepuscular_catNot          0.3059    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
catnoctpred3 <- orchard_plot(func_mod3_cat_prednoct, mod = "Crepuscular_cat", xlab = "Nocturnality in response to disturbance (RR - dominant)", group = "Study_ID",
                    flip = F)
catnoctpred3

7.0.3 Diurnal

Code
func_mod4_cat_herbnoct <- rma.mv(yi = RR, V = vcvherb_noct,
                         random = list(~1 | Study_ID,
                                       ~1 | Species, # phylo effect 
                                       ~1 | Species_tree, # non-phylo effect 
                                       ~1 | Obs_ID), # this is needed
                         mods = ~  Diurnal_cat -1,
                         data =  herbnoct,
                         test = "t",
                         sparse = TRUE,
                         R = list(Species = cor1_noct)
)

summary(func_mod4_cat_herbnoct)

Multivariate Meta-Analysis Model (k = 100; method: REML)

  logLik  Deviance       AIC       BIC      AICc   
-79.3309  158.6617  170.6617  186.1715  171.5848   

Variance Components:

            estim    sqrt  nlvls  fixed        factor    R 
sigma^2.1  0.0116  0.1078     19     no      Study_ID   no 
sigma^2.2  0.0000  0.0000     58     no       Species  yes 
sigma^2.3  0.0000  0.0000     58     no  Species_tree   no 
sigma^2.4  0.2309  0.4806    100     no        Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 98) = 6567.9136, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 98) = 0.2115, p-val = 0.8098

Model Results:

                    estimate      se     tval  df    pval    ci.lb   ci.ub    
Diurnal_catDiurnal    0.0651  0.1095   0.5945  98  0.5535  -0.1522  0.2824    
Diurnal_catNot       -0.0105  0.0666  -0.1580  98  0.8747  -0.1427  0.1217    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
catnoct4 <- orchard_plot(func_mod4_cat_herbnoct, mod = "Diurnal_cat", xlab = "Nocturnality in response to disturbance (RR - subordinate)", group = "Study_ID",
                    flip = F)
catnoct4

Code
func_mod4_cat_prednoct <- rma.mv(yi = RR, V = vcvpred_noct,
                         random = list(~1 | Study_ID,
                                       ~1 | Species, # phylo effect 
                                       ~1 | Species_tree, # non-phylo effect 
                                       ~1 | Obs_ID), # this is needed
                         mods = ~  Diurnal_cat -1,
                         data =  prednoct,
                         test = "t",
                         sparse = TRUE,
                         R = list(Species = cor1_noct)
)

summary(func_mod4_cat_prednoct)

Multivariate Meta-Analysis Model (k = 62; method: REML)

  logLik  Deviance       AIC       BIC      AICc   
-65.7433  131.4866  143.4866  156.0527  145.0715   

Variance Components:

            estim    sqrt  nlvls  fixed        factor    R 
sigma^2.1  0.0000  0.0000     19     no      Study_ID   no 
sigma^2.2  0.0000  0.0000     22     no       Species  yes 
sigma^2.3  0.0000  0.0000     22     no  Species_tree   no 
sigma^2.4  0.3355  0.5792     62     no        Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 60) = 1500.9484, p-val < .0001

Test of Moderators (coefficients 1:2):
F(df1 = 2, df2 = 60) = 0.4913, p-val = 0.6142

Model Results:

                    estimate      se    tval  df    pval    ci.lb   ci.ub    
Diurnal_catDiurnal    0.0874  0.1600  0.5464  60  0.5868  -0.2326  0.4074    
Diurnal_catNot        0.0788  0.0938  0.8402  60  0.4042  -0.1088  0.2664    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
catnoctpred4 <- orchard_plot(func_mod4_cat_prednoct, mod = "Diurnal_cat", xlab = "Nocturnality in response to disturbance (RR - dominant)", group = "Study_ID",
                    flip = F)
catnoctpred4

8 Publication bias testing predator-prey

8.1 Decline effect for difference


Multivariate Meta-Analysis Model (k = 480; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-531.5243  1063.0487  1077.0487  1106.2506  1077.2865   

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0284  0.1685     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0001     33     no   Predator  yes 
sigma^2.3  0.0472  0.2172     33     no  Predator2   no 
sigma^2.4  0.0578  0.2405    106     no       Prey  yes 
sigma^2.5  0.0192  0.1386    106     no      Prey2   no 
sigma^2.6  0.3380  0.5814    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 479) = 5544.4904, p-val < .0001

Model Results:

      estimate      se    tval   df    pval    ci.lb   ci.ub    
Year    0.0000  0.0001  0.1057  479  0.9159  -0.0001  0.0001    

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
   R2_marginal R2_conditional 
          0.00          31.11 

8.2 Eggers regression + funnel


Multivariate Meta-Analysis Model (k = 480; method: REML)

   logLik   Deviance        AIC        BIC       AICc   
-526.6004  1053.2008  1069.2008  1102.5577  1069.5078   

Variance Components:

            estim    sqrt  nlvls  fixed     factor    R 
sigma^2.1  0.0171  0.1310     57     no   Study_ID   no 
sigma^2.2  0.0000  0.0000     33     no   Predator  yes 
sigma^2.3  0.0406  0.2015     33     no  Predator2   no 
sigma^2.4  0.0277  0.1665    106     no       Prey  yes 
sigma^2.5  0.0168  0.1297    106     no      Prey2   no 
sigma^2.6  0.3428  0.5855    480     no     Obs_ID   no 

Test for Residual Heterogeneity:
QE(df = 478) = 5420.3268, p-val < .0001

Test of Moderators (coefficient 2):
F(df1 = 1, df2 = 478) = 8.9772, p-val = 0.0029

Model Results:

           estimate      se     tval   df    pval    ci.lb   ci.ub     
intrcpt     -0.1188  0.1237  -0.9602  478  0.3374  -0.3618  0.1243     
sqeffectN    0.0071  0.0024   2.9962  478  0.0029   0.0024  0.0118  ** 

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

8.3 Leave one out - predator-prey

9 R Session Information

Code
# pander for making it look nicer
sessionInfo() %>% pander()

R version 4.4.2 (2024-10-31)

Platform: aarch64-apple-darwin20

locale: en_US.UTF-8||en_US.UTF-8||en_US.UTF-8||C||en_US.UTF-8||en_US.UTF-8

attached base packages: stats, graphics, grDevices, utils, datasets, methods and base

other attached packages: tidybayes(v.3.0.7), scales(v.1.3.0), functional(v.0.6), colorspace(v.2.1-1), ggnewscale(v.0.5.1), kableExtra(v.1.4.0), pander(v.0.6.6), brms(v.2.22.0), Rcpp(v.1.0.13-1), multcomp(v.1.4-28), TH.data(v.1.1-3), MASS(v.7.3-61), survival(v.3.7-0), mvtnorm(v.1.3-3), ape(v.5.8-1), matrixcalc(v.1.0-6), data.table(v.1.17.0), here(v.1.0.1), broom(v.1.0.7), orchaRd(v.2.0), emmeans(v.1.10.7), R.rsp(v.0.46.0), patchwork(v.1.3.0), metafor(v.4.8-0), numDeriv(v.2016.8-1.1), metadat(v.1.4-0), Matrix(v.1.7-1), lubridate(v.1.9.4), forcats(v.1.0.0), stringr(v.1.5.1), dplyr(v.1.1.4), purrr(v.1.0.2), readr(v.2.1.5), tidyr(v.1.3.1), tibble(v.3.2.1), ggplot2(v.3.5.1), tidyverse(v.2.0.0), devtools(v.2.4.5) and usethis(v.3.1.0)

loaded via a namespace (and not attached): remotes(v.2.5.0), sandwich(v.3.1-1), rlang(v.1.1.4), magrittr(v.2.0.3), matrixStats(v.1.5.0), compiler(v.4.4.2), mgcv(v.1.9-1), loo(v.2.8.0), systemfonts(v.1.1.0), vctrs(v.0.6.5), profvis(v.0.4.0), arrayhelpers(v.1.1-0), pkgconfig(v.2.0.3), fastmap(v.1.2.0), backports(v.1.5.0), ellipsis(v.0.3.2), labeling(v.0.4.3), promises(v.1.3.2), rmarkdown(v.2.29), sessioninfo(v.1.2.2), tzdb(v.0.4.0), ggbeeswarm(v.0.7.2), xfun(v.0.49), cachem(v.1.1.0), jsonlite(v.1.8.9), later(v.1.4.1), parallel(v.4.4.2), R6(v.2.5.1), stringi(v.1.8.4), pkgload(v.1.4.0), estimability(v.1.5.1), knitr(v.1.49), zoo(v.1.8-13), pacman(v.0.5.1), R.utils(v.2.13.0), bayesplot(v.1.11.1), httpuv(v.1.6.15), splines(v.4.4.2), R.cache(v.0.16.0), timechange(v.0.3.0), tidyselect(v.1.2.1), rstudioapi(v.0.17.1), abind(v.1.4-8), yaml(v.2.3.10), codetools(v.0.2-20), miniUI(v.0.1.1.1), pkgbuild(v.1.4.5), lattice(v.0.22-6), shiny(v.1.10.0), withr(v.3.0.2), bridgesampling(v.1.1-2), posterior(v.1.6.1), coda(v.0.19-4.1), evaluate(v.1.0.1), RcppParallel(v.5.1.10), urlchecker(v.1.0.1), ggdist(v.3.3.2), xml2(v.1.3.6), pillar(v.1.10.0), BiocManager(v.1.30.25), tensorA(v.0.36.2.1), checkmate(v.2.3.2), distributional(v.0.5.0), generics(v.0.1.3), rprojroot(v.2.0.4), mathjaxr(v.1.6-0), hms(v.1.1.3), rstantools(v.2.4.0), munsell(v.0.5.1), xtable(v.1.8-4), glue(v.1.8.0), tools(v.4.4.2), fs(v.1.6.5), grid(v.4.4.2), nlme(v.3.1-166), beeswarm(v.0.4.0), vipor(v.0.4.7), latex2exp(v.0.9.6), cli(v.3.6.3), svUnit(v.1.0.6), viridisLite(v.0.4.2), svglite(v.2.1.3), Brobdingnag(v.1.2-9), gtable(v.0.3.6), R.methodsS3(v.1.8.2), digest(v.0.6.37), htmlwidgets(v.1.6.4), farver(v.2.1.2), memoise(v.2.0.1), htmltools(v.0.5.8.1), R.oo(v.1.27.0), lifecycle(v.1.0.4) and mime(v.0.12)