sim_stochastic: Stochastic simulations of multiple fields of aphids and...

View source: R/simulate.R

sim_stochasticR Documentation

Stochastic simulations of multiple fields of aphids and wasps.

Description

Stochastic simulations of multiple fields of aphids and wasps.

Usage

sim_stochastic(
  clonal_lines,
  n_fields = 2,
  max_t = 250,
  wasp_badger_n = 0,
  aphid_demog_error = TRUE,
  wasp_demog_error = TRUE,
  environ_error = FALSE,
  sigma_x = environ$sigma_x,
  sigma_y = environ$sigma_y,
  rho = environ$rho,
  n_reps = 1,
  n_threads = 1,
  ...
)

Arguments

clonal_lines

A multiAphid object containing the aphid-line-specific info for all the lines in the simulations. Each object in the multiAphid is an aphid object that results from the clonal_line function. Combine them using c(aphid_obj1, aphid_obj2).

n_fields

The number of fields to simulate. Wasps operate at the field level, whereas aphids operate at the plant level. Both wasps and aphids operate separately across fields but can be connected via dispersal (see arguments wasp_disp_m0, wasp_disp_m1, and alate_field_disp_p). Defaults to 2.

max_t

How many days to simulate. Defaults to 250.

wasp_badger_n

The number of aphids each adult wasp badgers and kills per time step. Defaults to 0.

aphid_demog_error

Logical for whether to have demographic stochasticity for aphids. Defaults to FALSE.

wasp_demog_error

Logical for whether to have demographic stochasticity for wasps. Defaults to FALSE.

environ_error

Logical for whether to have environmental stochasticity. This argument applies to both aphids and wasps, but if you want to have just one species experience environmental stochasticity, then you can set their associated ⁠sigma_*⁠ argument to zero. Defaults to FALSE.

sigma_x

Standard deviation of environmental stochasticity for aphids. This argument has no effect if environ_error = FALSE. Defaults to the internal object environ$sigma_x, which is from Meisner et al. (2014).

sigma_y

Standard deviation of environmental stochasticity for wasps. This argument has no effect if environ_error = FALSE. Defaults to the internal object environ$sigma_y, which is from Meisner et al. (2014).

rho

Environmental correlation among instars. Defaults to environ$rho.

n_reps

Number of reps to simulate. Defaults to 1.

n_threads

Number of threads to use if OpenMP is enabled (ignored otherwise). Find out whether it's enabled using gameofclones:::using_openmp(). Defaults to 1.

See Also

sim_experiments()


lucasnell/clonewars documentation built on Oct. 12, 2023, 4:39 p.m.