run_sim_lambda: Run lambda simulation

Description Usage Arguments Value

View source: R/simulate.R

Description

Run the simulation. Currently, it runs all time steps, but for the economic model, the structure will need to be slightly adjusted to run a single time step. The initialization is separated from this function for that reason.

Usage

1
2
run_sim_lambda(ngrid, ncell, g.p, lambda, lc.df, sdd.pr, N.init,
  method = "wt.mn", verbose = F)

Arguments

ngrid

Number of grid cells in entire map

ncell

Number of inbound grid cells

g.p

Named list of global parameters set with set_g_p

lambda

Vector of length n.lc with lambdas for each land cover type

lc.df

Dataframe or tibble with xy coords, land cover proportions, and cell id info

sdd.pr

Array with sdd probabilities and neighborhoods created by sdd_set_probs

N.init

Matrix or array with initial population sizes created by pop_init

method

"wt.mn" Method for calculating cell expectations, taking values of "wt.mn" or "lm". If "wt.mn", the expectation for each parameter is the weighted mean across land cover types proportional to their coverage, with the land cover specific values stored in the parameter vectors. If "lm", the expectation is calculated in a regression with the slopes contained in each parameter vector. Individuals cannot be assigned to specific land cover categories with "lm", so "m" must be scalar.

verbose

TRUE Show progress bar?

Value

Matrix N of abundances for each cell and time step and vector lambda.E of predicted lambda value for each cell


Sz-Tim/gbPopMod documentation built on Dec. 7, 2020, 1:07 p.m.