cdynsim: Community dynamics simulation with stock enhancement

View source: R/cdynsim.R

cdynsimR Documentation

Community dynamics simulation with stock enhancement

Description

Community dynamics simulation with stock enhancement

Usage

cdynsim(
  n_timestep = 1000,
  n_warmup = 100,
  n_burnin = 100,
  n_stock_start = NULL,
  n_species = 10,
  k = 100,
  r_type = "constant",
  r = 1.5,
  r_min = 1,
  r_max = 3.5,
  sd_env = 0.1,
  stochastic = FALSE,
  stock = 0,
  phi = 1,
  int_type = "constant",
  alpha = 0.5,
  alpha_scale = TRUE,
  inv_sign = TRUE,
  immigration = 0,
  sd_immigration = 0,
  p_immigration = 0,
  model = "ricker",
  seed = 5,
  seed_interval = 10,
  extinct = 0
)

Arguments

n_timestep

Number of simulation time steps to be saved

n_warmup

Number of warm-up time steps. Species are randomly seeded during this period with no stock enhancement.

n_burnin

Number of burn-in time steps. Stock enhancement operates.

n_stock_start

Time step at which stocking starts.

n_species

Number of species in a simulated community.

k

Carrying capacity.

r_type

Generation method for intrinsic population growth rates. Either "constant" or "random".

r

Intrinsic population growth rate. Disabled if r_type = "random".

r_min

Minimum value of intrinsic population growth rate. Disabled if r_type = "constant".

r_max

Maximum value of intrinsic population growth rate. Disabled if r_type = "constant".

sd_env

SD of environmental stochasticity in a log scale.

stochastic

Whether demographic stochasticity is induced or not. If TRUE, population & immigration outcomes will be a random draws from a Poisson distribution with the expected value of population density or immigration.

stock

Number of released individuals.

phi

Fitness of released individuals relative to wild individuals.

int_type

Generation method for an interaction matrix. Either "constant" or "random". If "random", competition coefficients are randomly generated with an exponential distribution Exp(1/alpha). If "constant", competition coefficients are constant or supplied as a full matrix.

alpha

Competition coefficient. If int_type = "constant", constant or a full matrix . If int_type = "random", alpha represents the expected value of an exponential distribution. Provide a full matrix if int_type = "manual".

alpha_scale

Logical. If TRUE, competition coefficients are scaled by carrying capacity.

inv_sign

Logical. Indicate whether the sign of competition coefficients is multiplied by minus one. If TRUE, values in alpha will become -alpha internally. For example, with a Ricker model, the equation will be x * exp(r - alpha * x) (x * exp(r + alpha * x) if inv_sign = FALSE)

immigration

Mean immigration per generation. Immigration is determined as m ~ N(log(immigration), sd_immigration^2)

sd_immigration

SD immigration over time in a log scale.

p_immigration

Probability of immigration.

model

Model for community dynamics. Either "ricker" (multi-species Ricker model) or "bh" (multi-species Beverton-Holt model).

seed

Expected number of seeds.

seed_interval

Time interval for seeding.

extinct

Absorbing condition. Species with density < extinct will be removed from the simulation.

Value

df_dyn

df_community

df_species

interaction_matrix

Author(s)

Akira Terui, hanabi0111@gmail.com


aterui/cdyns documentation built on Nov. 29, 2024, 9:32 a.m.