Results {#results}

require(here)
#results from bayesian model
dat_all_output <- read_csv("./data/plot-all-data1.csv")

#simple min number of captures data
source(here::here("./R/wrangling/Data_CRinput_mice_jan2019.R"), echo = FALSE)

# data needed in manuscript
source(here::here("./code/04-MNA-mouse-results-manuscript-func.R"), echo = FALSE)

#run function
min.mice <- raw_estimates_func(ind = ind)

#renaming datasets for ease
dat_raw_caps <- min.mice
start <- c("January 1999")
end <- c("June 2001")

We captured at total of r sum(dat_raw_caps$n) #*2370* individual mice, r 219 #sum(dat_raw_caps$n) ship rats, and Kiore during a total of r 94 #length(unique(dat_raw_caps$trip.no)) trips. The stoat control operation in the Eglinton Valley removed a total of r 792 #sum(dat_raw_caps$n) individual stoats between r start and r end [@choquenot2003]. During this operation, low numbers of rats were also removed as by-catch in stoat traps but no other independent predator control was conducted in either study Valley during our data collection. Incidental stoat captures during our routine rodent trapping sessions were uncommon (proportion of total captures that were stoats < 0.01). Lower numbers of stoats were captured in the Eglinton Valley ($N_{stoats} = 8$) where the long-term predator control program was undertaken than the Hollyford Valley ($N_{stoats} = 20$).

Seedfall

#data for plot
source(here::here("./code/05-raw-seed-results.R"))
seed_N_144_summary <- raw_estimates_seed_func(dat_all_output)

###summaries for inline chuncks below:
year_2000_summary <- dat_all_output %>%
  select(cum.seed, Valley, Control, var, year) %>%
filter(year == 2000)

##min observatoon
# min_ob$cum.seed
min_ob <- dat_all_output %>%
  select(cum.seed, Valley, Control, var, year) %>%
filter(cum.seed == min(year_2000_summary$cum.seed))

## max observation
# max_ob$cum.seed
max_ob <- dat_all_output %>%
   select(cum.seed, Valley, Control, var, year) %>%
filter(cum.seed == max(year_2000_summary$cum.seed))

Our study captured two years (2000 and 2003) of generically high seedfall (seedfall > $2000 m^2$). During 2001, 2002 and 2004 we observed low seedfall on all grids (Figure \@ref(fig:figure-three-trends-seed)). We observed high spatial variability both between and within each trip. For example, in 2000, the observed difference in seedfall between grids varied from the highest largest estimate of available seed ($Seed_{7,2}$ = r round(max_ob$cum.seed, 0) $m^2$); Eglinton Valley) and two grids in the Hollyford Valley recorded zero seedfall on the same trip ($Seed_{4,2}$ and $Seed_{4,5}= 0$ $m^2$).

#seed plot
## ggplot base needed in manuscript
# base_seed_plot <- base_seed_plot(seed_N_144_summary = seed_N_144_summary)
#not needed as shorter below now
source(here::here("./code/05-base_seed_plot_func.R"), echo = FALSE)

# jitter everything the same is harrrrrd
location.move <- position_dodge(width = 30)

#importing point data
source(here::here("./code/05-raw-seed-results.R"), echo = FALSE)
seed_N_144_summary <- raw_estimates_seed_func(dat_all_output = dat_all_output) ## raw n = 144

# names(seed_N_144_summary)

##grouped data
full_grouped_seed <- full_grouped_seed_func(dat_all_output = dat_all_output)

## Final plot
base_seed_plot(seed_N_144_summary) + 
  geom_point(data = full_grouped_seed, aes(y = mean_seed, x = Date, shape = Valley, col = Control, fill = Control), alpha = 1,
             size = 4) +
geom_line(data = full_grouped_seed, aes(y = mean_seed, x = Date, group = paste(Valley, Control)), col = "grey50") +
  geom_errorbar(data = full_grouped_seed, aes(y = mean_seed, x = Date, ymin = lcl_seed, ymax = ucl_seed, width = 0), lwd = 0.4, col = "grey50", position = location.move, alpha = 1) +
  facet_wrap(~Valley, scales = "free", ncol = 2)

#caption
cap.seed <- "The average beech seedfall collected each season during the study period (Autumn 1999 to Winter 2004; n = 20). The shape distinguishes the two valleys apart (triangles = Eglinton Valley, circles = Hollyford Valley). Hollow symbols represent cases where stoats are controlled and solid fill in valleys with stoat were uncontrolled."

Mice

source(here::here("./R/davidson_2019_theme.r"), echo = FALSE)
source(here::here("./R/theme_raw_fig3s.r"), echo = FALSE)
#results from bayesian model
source(here::here("./R/Davidson_2019_Data_wrangling2.R"), echo = FALSE)

# raw data
#data for plot
source(here::here("./code/06-raw-mice-results.R"))
mice_N_144_summary <- raw_estimates_seed_func(dat_all_output)

#mouse plot
## ggplot base needed in manuscript
# base_seed_plot <- base_seed_plot(seed_N_144_summary = seed_N_144_summary)
#not needed as shorter below now
source(here::here("./code/06-base_mice_plot_func.R"), echo = FALSE)
base_mice_plot <- base_mice_plot(mouse_N_144_summary = mouse_N_144_summary)
# jitter everything the same is harrrrrd
location.move <- position_dodge(width = 30)

#importing point data
source(here::here("./code/06-raw-mice-results.R"), echo = FALSE)
mice_N_144_summary <- raw_estimates_mice_func(dat_all_output = dat_all_output) ## raw n = 144

# names(mice_N_144_summary)

##grouped data
full_grouped_mice <- mouse_N_144_summary %>%
  group_by(Control,Valley,Conditions, Date)  %>%
  summarise(N.count = n(),
            N = mean(N, rm.na = TRUE),
            tvalue = qt(p = 0.025, df = N.count - 1, lower.tail = FALSE),
            low.se = mean(se.N),
            lcl.low.tv = N - (tvalue*low.se),
            ucl.low.tv = N + (tvalue*low.se),
            lcl.low = N - (1.96*low.se),
            ucl.low = N + (1.96*low.se))

## Final plot
# base_seed_plot(seed_N_144_summary) + 
#   geom_point(data = full_grouped_seed, aes(y = mean_seed, x = Date, shape = Valley, col = Control, fill = Control), alpha = 1,
#              size = 6) +
# geom_line(data = full_grouped_seed, aes(y = mean_seed, x = Date, group = paste(Valley, Control)), col = "grey50") +
#   geom_errorbar(data = full_grouped_seed, aes(y = mean_seed, x = Date, ymin = lcl_seed, ymax = ucl_seed, width = 0), lwd = 0.4, col = "grey50", position = location.move, alpha = 1) +
#   facet_wrap(~Valley, scales = "free", ncol = 2)
# 
# #Summarise ggplot axis etc
# base_mouse_plot <- ggplot(mouse_N_144_summary,
#                      aes(
#                        y = N,
#                        col = Control,
#                        shape = Valley,
#                        fill = Control,
#                        x = Date
#                      )) +
# 
# # backgroud layout
# geom_rect(aes(xmin=ymd('2000-01-01'),xmax = ymd('2000-12-31'),ymin = -Inf,ymax = Inf), colour = "grey90", fill = "grey90") +
# geom_rect(aes(xmin=ymd('2002-01-01'),xmax = ymd('2002-12-31'),ymin = -Inf,ymax = Inf), colour = "grey90", fill = "grey90") +
# geom_rect(aes(xmin=ymd('2004-01-01'),xmax = ymd('2004-12-31'),ymin = -Inf,ymax = Inf), colour = "grey90", fill = "grey90") +
# 
# #axis labels
# xlab(expression(paste("Time", "(", italic(t), ")"))) +
# ylab(expression(paste("Mouse abundance ", " (", italic(N[jt]), ")"))) +
#   
# #themes
# theme_tufte() +
#   theme_bw() +
#   theme(strip.background = element_blank(),
#         strip.text.y = element_blank(),
# 
#         plot.title = element_text(hjust = 0, size=24, family = "Times", color="black", margin = margin(t = 10, b = 10)),
#         plot.subtitle=element_text(size=16, face="italic", color="black"),
# 
#         legend.position = "none",
#         legend.key = element_blank(),
#         legend.background = element_rect(fill="white", size=1),
#         legend.key.size=unit(1,"cm"),
#         legend.text = element_text(colour = "black", size =16, family = "Times"),
#         legend.title = element_text(colour = "black", size =16, family = "Times"),
# 
#         panel.grid.major = element_blank(),
#         panel.grid.minor = element_blank(),
#         panel.spacing = unit(2, "lines"),
#         panel.border = element_blank(),
# 
#         axis.title.y = element_text(colour = "black",size =20, family = "Times", angle = 90),
#         axis.title.x = element_text(colour = "black", size =20, family = "Times"),
#         axis.text.y=element_text(colour = "black",size = 20, family = "Times"),
#         axis.text.x = element_text(colour = "black", size =20, family = "Times"),
# 
#         axis.ticks.x = element_line(size = 1),
#         axis.ticks.y = element_line(size = 1),
#         axis.line.x = element_line(size = 1),
#         axis.line.y = element_line(size = 1),
# 
#         strip.text = element_text(face="bold",colour = "black",size =14, family = "Times"))
# 
# #test
# base_mouse_plot
#results from bayesian model
require(tidyverse)
source("./R/davidson_2019_theme.r")
source("./R/Davidson_2019_Data_wrangling2.R")

dat_all_output <- read_csv("./data/plot-all-data1.csv")
# names(dat_all_output)

###summaries for inline chuncks below:
mouse_N_144_summary <- dat_all_output %>%
  select(N,se.N, lcl.N, ucl.N, Valley, Control, Conditions, var, year, Date, trip, grid) %>%
  mutate(grid.id = factor(paste(Control, Valley)),
         Conditions = factor(Conditions, labels = c("Rats unmodified", "Rats removed")))

# str(mouse_N_144_summary$grid.id)
mouse_N_40_summary <-  mouse_N_144_summary %>%
  group_by(Control, Valley, Date) %>%
  summarise(N = mean(N),
            Rats = factor("Full", levels = c("Full", "Reduced"))) %>%
  ungroup() %>%
  mutate(grid = factor(paste(Control, Valley)))

# summary for plots
# create summarised datasets of need
mouse_N_40_summary <- mouse_N_144_summary %>%
  group_by(Control,Valley, trip) %>%
  summarise(N.count = n(),
            N = mean(N, rm.na = TRUE),
            tvalue = qt(p = 0.025, df = N.count - 1, lower.tail = FALSE),
            low.se = mean(se.N),
            lcl.low.tv = N - (tvalue*low.se),
            ucl.low.tv = N + (tvalue*low.se),
            lcl.low = N - (1.96*low.se),
            ucl.low = N + (1.96*low.se))

##extraas I think
mouse_N_80_summary <- mouse_N_144_summary %>%
  group_by(Control,Valley,Conditions, Date)  %>%
  summarise(N.count = n(),
            N = mean(N, rm.na = TRUE),
            tvalue = qt(p = 0.025, df = N.count - 1, lower.tail = FALSE),
            low.se = mean(se.N),
            lcl.low.tv = N - (tvalue*low.se),
            ucl.low.tv = N + (tvalue*low.se),
            lcl.low = N - (1.96*low.se),
            ucl.low = N + (1.96*low.se))

We estimated mouse abundance ($N_{j,t}$), where $j$ represents each unique grid and $t$ for each trip from the overall community dynamics model. We found that mouse abundance was greatest in the Eglinton Valley in grids and trips where seed availability was also high. In any given year mouse abundance was on average greater in the Eglinton Valley (Figure \@ref(fig:figure-three-trends-mice); triangles) than the Hollyford Valley (Figure \@ref(fig:figure-three-trends-mice); circles).

#plot summary by valley
## ----new-mice------------------------------------------------------------
#not needed as shorter below now
source(here::here("./code/06-base_mice_plot_func.R"), echo = FALSE)

base_mice_plot(mouse_N_144_summary = mouse_N_144_summary) + 
  geom_errorbar(data = mouse_N_80_summary, aes(ymin = lcl.low, ymax = ucl.low, width = 0), lwd = 0.7, col = "black", alpha = 0.7) +

  geom_line(data = mouse_N_80_summary, aes(group = paste(Control,Valley,Conditions))) +

  geom_point(data = mouse_N_80_summary, aes(y = N, x = Date),size = 4, alpha = 0.7) +

  facet_wrap(~Conditions, scales = "free", ncol = 2) + 
  scale_color_manual(name = "Stoat Control",
                     values = c("white", "black")) +

  scale_shape_manual(name = "Ecosystem",
                     values = c(24, 21)) +

  # # manually define the fill colours
  # 
  scale_fill_manual(name = "Stoat Control",
    values = c("black", "white")) +

  # scale_y_continuous(expand = c(0,0.01),breaks = seq(-4,4,1)) +


  # Remove fill legend and replace the fill legend using the newly created size
  guides(
    col = "none",
    shape = guide_legend(override.aes = list(
      shape = c(24, 21), size = 4
    )),
    fill = guide_legend(override.aes = list(
      col = c("black", "white"), shape = c("square"),
      size = 4
    ))
  ) #+
    # theme(legend.position = "right")

cap.mice <- c("The abundance of mice ($N_{j,t}$; point estimates) collected each trip during the study period (Autumn 1999 to Winter 2004). The shape distinguishes the two valleys apart (triangles = Eglinton Valley, circles = Hollyford Valley) and solid symbols represent cases where stoats are uncontrolled and hollow in valleys where stoat control was undertaken. Rats were removed in the right hand figure.")

Rats

Rats and mice displayed a similar response to beech seed (Figure \@ref(fig:figure-three-trends-seed) and \@ref(fig:figure-three-trends-mice) respectively). However, the overall number of rats captured $(R_{j,t})$ remained relatively low in both valleys throughout our six-year study, except for a single trip in Spring 2004 (n = 25). The highest rat abundances were recorded in the Hollyford Valley.

require(ggthemes)
require(tidyverse)

#data needed
source(here::here("./Code/03_code_for_rats_raw_results_function.R"))
#results from bayesian model

source(here::here("./R/Davidson_2019_Data_wrangling2.R"))

# plot rat CIs
rat.plot <- 
  ggplot(p.design2, aes(y = N,col = Rats,shape = Valley,fill = Control,x = Date)) +
  geom_rect(aes(xmin=ymd('2000-01-01'),xmax = ymd('2000-12-31'),ymin = -Inf,ymax = Inf), colour = "grey90", fill = "grey90") +
  geom_rect(aes(xmin=ymd('2002-01-01'),xmax = ymd('2002-12-31'),ymin = -Inf,ymax = Inf), colour = "grey90", fill = "grey90") +
  geom_rect(aes(xmin=ymd('2004-01-01'),xmax = ymd('2004-12-31'),ymin = -Inf,ymax = Inf), colour = "grey90", fill = "grey90") +

   geom_errorbar(aes(ymin = lcl.slog, ymax = ucl.slog, width = 0), lwd = 0.7, col = "black", position = location.move) +

  geom_line(data = rat.mean,
    aes(y = mean.rat,
        x = Date),
    size = 0.95,
    col = "grey50", position = location.move) +

  geom_point(data = rat.mean,aes( y = mean.rat,      col = Rats,
      shape = Valley,
      fill = Control,
      x = Date
    ),size = 6 , alpha = 0.7, position = location.move) +

  xlab(expression(paste("Time", "(", italic(t), ")"))) +

  ylab(expression(atop(paste("Minimum "," ", " number"," "),
                       paste(" ", "of"," ",
                             "rats"," ","(",italic(R[jt]),")"))) ) +
  scale_color_manual(name = "Stoat Control",
                     values = c("black", "white", "white")) +

  scale_shape_manual(name = "Ecosystem",
                     values = c(24, 21)) +

  scale_size_manual(name = "Rat Control", values = c(2.5, 3, 2.5)) +
  # manually define the fill colours

  scale_fill_manual(name = "Stoat Control",
    values = c("white", "black", "white")) +


  xlab(expression(paste("Time", "(", italic(t), ")"))) +

  ylab(expression(atop(paste("Minimum "," ", " number"," "),
                       paste(" ", "of"," ",
                             "rats"," ","(",italic(R[jt]),")"))) ) +
  # scale_y_continuous(expand = c(0,0.01),breaks = seq(-4,4,1)) +


  # Remove fill legend and replace the fill legend using the newly created size
  guides(
    col = "none",
    size = guide_legend(override.aes = list(
      shape = c(15,0),alpha = 1
    )),
    shape = guide_legend(override.aes = list(
      shape = c(24, 21), size = 4
    )),
    fill = guide_legend(override.aes = list(
      col = c("white", "black"),shape = c("square"),
      size = 4
    ))
  ) +
theme_tufte() +
  theme_bw() +
  theme(strip.background = element_blank(),
        strip.text.y = element_blank(),

        plot.title = element_text(hjust = 0, size=24, family = "Times", color="black", margin = margin(t = 10, b = 10)),
        plot.subtitle=element_text(size=16, face="italic", color="black"),

        legend.position = "right",
        legend.key = element_blank(),
        legend.background = element_rect(fill="white", size=1),
        legend.key.size=unit(1,"cm"),
        legend.text = element_text(colour = "black", size =10, family = "Times"),
        legend.title = element_text(colour = "black", size =10, family = "Times"),

        panel.grid.major = element_blank(),
        panel.grid.minor = element_blank(),
        panel.spacing = unit(2, "lines"),
        panel.border = element_blank(),

        axis.title.y = element_text(colour = "black",size =20, family = "Times", angle = 90),
        axis.title.x = element_text(colour = "black", size =20, family = "Times"),
        axis.text.y=element_text(colour = "black",size = 20, family = "Times"),
        axis.text.x = element_text(colour = "black", size =20, family = "Times"),

        axis.ticks.x = element_line(size = 1),
        axis.ticks.y = element_line(size = 1),
        axis.line.x = element_line(size = 1),
        axis.line.y = element_line(size = 1),

        strip.text = element_text(face="bold",colour = "black",size =14, family = "Times"))

rat.plot

# plot
#rat.plot

#caption
# , fig.cap=cap.rat
cap.rat <- c("The avarage number of rat captures ($R_{j,t}$; point estimates) collected each trip during the study period (Autumn 1999 to Winter 2004). The shape of each point distinguishes the two valleys (triangle = Eglinton Valley, circle = Hollyford Valley) and solid symbols represent cases where stoats are uncontrolled and hollow in valleys with stoat removal.")

#blown up
# knitr::include_graphics(c("./figs/rats.png"))

All other trips with high rat records were in areas with stoat control. In the Hollyford Valley during both mast-years (2000, 2003), rats increased both before and after stoat control being implemented in May 2002. No rats were captured after May 2002 in the Eglinton Valley but there was also much more food available in the Hollyford valley during the same time (trips).

Prediction A

require(jtools)

# data
source("./R/data_input.R")
# source("./R/figures/pa-analysis-code.R", echo = FALSE)
source("./R/figures/pa-plot-code.R", echo = FALSE)

# final model
low.mod3 <- glm(N ~ Control + Valley, family = "poisson", data = low.abund.dat)
summary.low.mod3 <- summary(low.mod3)
low.mod3.fun <- anova(low.mod3, test = "F")

# summary.low.mod3
low_mean_diff <- summary.low.mod3$coefficients[2,2]
low_se <- summary.low.mod3$coefficients[2,4]
low_pvalue <- summary.low.mod3$coefficients[2,4]

Stoat control does not increase mouse populations at times of low abundance.

We compared the abundance of mice during trips when both mouse abundance and seedfall were low (r 2002 and 2003 using the model. We found no visually observable or statistically significant differences in the estimates between areas with and without stoat control (r summary.low.mod3$coefficients[2,2] SE = r summary.low.mod3$coefficients[2,1], p-value = r summary.low.mod3$coefficients[2,4]) during any of the trips during our study.

source("./R/figures/pa-plot-code.R")
# # # Plot
# low.plot.time
# + theme(legend.position = "right")

# low.plot.time
# gridExtra::grid.arrange(low.plot.time, output.dens, ncol = 2)
low.plot.out

cap.Pa <- c("Each point represents a sample of mouse abundance in the non-mast years of our study (2001, 2003).  The shape distinguishes the two valleys (triangles = Eglinton Valley, circles = Hollyford Valley). The samples are divided into areas where stoat control was undertaken (hollow symbols) and solid symbols represent areas where stoats where not controlled. Rats were manually removed from points on the right and un-modified on the left. Grey error bars represent the 95% crediable interval of the difference between areas with and without stoat control.")

Prediction B

Stoat control does not result in higher peak abundance of mice

# run source script
source("./R/figures/pb-plot-code.R", echo = FALSE)

# summary
# s.final.model <- summary(high.mod3)
# # s.final.model$coefficients[2,4]
# 
# # output from models in workable format
# co.effs.m2 <- c(row.names(as.data.frame(summary(high.mod2)$coefficients)))
# co.effs.m3 <- c(row.names(as.data.frame(summary(high.mod3)$coefficients)))
# 
# # results data
# pb.results.m2 <- data.frame(co.effs.m2, summary(high.mod2)$coefficients)
# pb.results.m3 <- data.frame(co.effs.m3, summary(high.mod3)$coefficients)

We found no significant difference between the stoat controlled and uncontrolled areas. We found that the intake rate $(S_{j,t})$ we transformed from the seedfall data $(Seed_{j,t})$ always had the greatest impact on the rate of increase of mice $(r_{j,k})$. Greater than both mouse density ($N_{j,t}$) and rat presence ($R_{j,t}$; Appendix).

# simple anova comparison
#flextable::flextable(pb.results.m3)

Overall we did observe lower peak mouse abundance in the Hollyford Valley compared to the Eglinton Valley ($-0.17$, SE = $0.09$, $'p-value' = 0.06$). Although this is not below the 0.05 threshold. It should be noted that when the rat removal treatment was removed the p-value did drop to 0.05.

# #data
# source("./R/figures/pb-plot-code.R", echo = FALSE)
#plot
# source("./R/figures/pa-topb-test.R", echo = FALSE)

high.plot.out

cap.Pb <- c("Difference between areas with and without stoat control at peak mouse abundance. The shape difference distinguishes the two valleys (triangle = Eglinton Valley, circle = Hollyford Valley). The grids are divided into the two groups on the x-axis (areas with and without stoat control). Solid symbols represent cases where rats are present and removed at points with hollow symbols.")

Our model accounted for the confounding effects of numerical processes such as density ($N_{j,t}$) and intake rate ($S_{j,t}$) using our Bayesian hierarchical model and then tested for evidence of mesopredator release of mice during our study. We used the fitted model parameters to estimate the differences between the key predictions proposed for areas with and without stoat control after accounting for both the observation error (data collection and population estimates) and process error (population dynamics; @ahrestani2013).

# s.final.model$coefficients[2,4]
# s.final.model$coefficients[3,4]

Prediction C

Stoat control did not increase mouse populations as food becomes available.

We tested the differences in the rate of increase of mouse populations between the four seasons, two valleys and stoat control areas (excluding the rat treatment) during seasons when mouse population were increasing (August; Autumn - Winter). We found was no significant differences between mice populations ($r_{j,t}$) during the increasing seasons of mouse dynamics. All 95% credible intervals for the differences between these trips included zero.

#rate vs seed data with lines for average prediction
source("./R/pc-plot-code.R", echo = FALSE)
# knitr::include_graphics(c("./figs/seeded.png"))

# # just most interesting variable
# # caption
pc.plot


cap.Pc = c("Visual representation of prediction C. Large points and lines are estimated from the mean effect of stoat control from the full Bayesian model. Prediction C was interested in the increasing seedfall phase (Autumn to Winter). The different shapes distinguish the two valley systems (triangles = Eglinton Valley; circles = Hollyford Valley) and all solid symbols represent cases where stoats are present and removed at points with hollow symbols. Each smaller transperent point is a data point used for the analysis (n = 144)")
# Save plot
# export plot for example vignette
# png("C://Code/beech-publication-wr/figs/seeded.png")
# pc.plot
# dev.off()

Prediction D

Stoat control did not hasten the decline from peak abundance.

# knitr::purl("Davidson_2019_Simple_models.Rmd")
# source("./R/Davidson_2019_Model_wrangling.R")
# source("./R/figures/pd-plot-code.R")

# pd.plot

This prediction specifically focused on the Spring and Summer seasons, when rodent populations are crashing (Figure \@ref(fig:figure-three-trends-mice) vs. Figure \@ref(fig:figure-three-trends-rats)). Overall density had a weak negative effect on mice dynamics under all conditions (Figure \@ref(fig:figure-three-trends-mice)) but was greatest during the declining seasons of mice dynamics. After accounting for seed and density in the population model there was a faster rate of decline in the Hollyford Valley (large solid circles) compared to the Eglinton Valley (large hollow circles) but this was not statistically significant.

# source("./R/data_input.R")
source("./R/pd-plot-code.R", echo = FALSE)

pD.plot

#caption
cap.Pd = c("Visual representation of the effect of stoat control during decreasing mouse abundance (Spring to Summer; *Prediction D*). The different shapes distinguish the two valley systems (triangles = Eglinton Valley; circles = Hollyford Valley) and all solid symbols represent cases where stoats are present and removed at points with hollow symbols.")

# export plot for example vignette
# png("C://Code/beech-publication-wr/figs/mouse_dens.png")
# pD.plot
# dev.off()

# knitr::include_graphics(c("./figs/mouse_dens.png"))

Prediction E

Does the presence of rats impact the population dynamics of mice at each of the seasons tested in Predictions A-D.

We found that rat numbers $R_{j,t}$ had the smallest overall effect on mice dynamics ($\mu(\beta_3$ $|All$ $Seasons)$ $0.007$) and was the most variable parameter in our community model ($CV_{rats} = 5.74$). We recorded the highest number of rats in February and May, at the same times of high mouse abundance (Figure \@ref(fig:figure-three-trends-mice)). The relationship between rats and mice was examined by comparing the estimated differences between treatments (Figure 8; lines represent mean relationships in the three treatment groups). We also statistically testing the difference between each different treatment and found no differences across all parameters (Figure \@ref(fig:pe-rat-code)).

````r

plot code

source(here::here("./R/pe-plot-code.R"), echo = FALSE)

plot

pe.plot

theme(legend.position = "right")

Save plot

export plot for example vignette

png("C://Code/beech-publication-wr/figs/fig_rat.png")

pe.plot

dev.off()

caption

pE.cap <- c("Differences in estimates between rats during each season of mice dynamics.")

knitr::include_graphics(c("./figs/fig_rat.png"))

```

We did not have enough data to estimate a statistical interaction between rats and mice (non-linear relationship) or other more complex non-linear models for rat dynamics.



davan690/beech-publication-wr documentation built on March 29, 2020, 11:09 a.m.