knitr::opts_chunk$set(echo = FALSE, messages = FALSE, warnings = FALSE,
                      fig.width = 9, fig.height = 9)

Jim 20220925: Assuming the “env” control the number of “simulations” how do I set up a scenario. Say I wanted to runs a series of simulations with the number of hosts set at - say 100 , the number of parasites set at 1000 and for 5000 iterations and calculate the envelope such a scenario? Does the Assuming I would like to run the “env’ routine, how would I do it?

Is this going to be available on the Population Ethology web site? If I wanted to look past means and standard deviations will envelope do that also? I have a lot to learn. I have started to look at the Isle Royale Biome study, but its going to take a while to figure out how convert that data into something that is useable for “ewing”.

I am looking forward to the “Start Simulation” button.

library(patchwork)

Interpolation of Ewing Curves

library(ewing)

Conduct 100 simulations with default settings and save with discrete time increment of 0.5 units.

data(simdata)
nsim <- length(simdata)
#nsim <- 100
#simdata <- ewing_discrete(nsim, increment = 0.5)

Simulation is done by steps, with time as a random, dependent variable. First we look at time as a function of step.

env <- ewing_envelope(simdata, "host", "time", "step")
t1 <- ggplot_ewing_envelope(env)
env <- ewing_envelope(simdata, "parasite", "time", "step")
t2 <- ggplot_ewing_envelope(env)
wrap_plots(t1, t2) + plot_layout(nrow = 2)

However, we saved simulations on discrete time steps of 0.5 units, so we can look at step as a function of time. Below all plots are with respect to time so that they are comparable across species.

env <- ewing_envelope(, "host", "step")
t1 <- ggplot_ewing_envelope(env)
env <- ewing_envelope(, "parasite", "step")
t2 <- ggplot_ewing_envelope(env)
patchwork::wrap_plots(t1, t2) + patchwork::plot_layout(nrow = 2)

Host and Parasite Counts over r nsim Simulations

envs <- ewing_envelopes()
summary(envs)
ggplot_ewing_envelopes()

Confidence Envelopes

envs <- ewing_envelopes()
ggplot_ewing_envelopes(envs, confidence = TRUE)


byandell/ewing documentation built on Jan. 3, 2024, 7:27 p.m.