Description Usage Arguments Value Note Author(s)
The first step used for modelling spatially-explicit demographic dynamics requires running this function, which checks the consistency of the user-supplied information and generates an R object containing the necessary information for modelling. The object is also saved in the working directory for future reference.
1 2 3 4 5 6 7 8 | demoniche_setup(modelname, Populations, stages,
Nichemap = "oneperiod", matrices, matrices_var = FALSE, prob_scenario = c(0.5, 0.5),
proportion_initial, density_individuals,
transition_affected_niche = FALSE, transition_affected_env = FALSE,
transition_affected_demogr = FALSE, env_stochas_type = "normal",
noise = 1, fraction_SDD = FALSE,
fraction_LDD = FALSE, dispersal_constants = c(0.7, 0.7, 0.1, 3),
no_yrs, Ktype = "ceiling", K = NULL, Kweight = FALSE, sumweight = FALSE)
|
modelname |
Character, desired name of the species object. |
Populations |
The matrix with the population IDs, X coordinates, Y coordinates and area in the columns. |
Nichemap |
The background niche map, with X coordinates, Y coordinates and niche values for different periods in the coulmns. |
matrices |
A matrix of transtion matrices for different scenarios, one column per matrix. The dimension should be a multiple of the number of stages. The first matrix should be the 'reference' matrix. The model can also run with a single matrix, in which case the mean population will be the same as the minimum and maximum population numbers, and the standard deviation NA (deterministic modelling). |
matrices_var |
A vector. Coefficients of variation in vital rates which are used to set how variable the environmental and demographic stocasticity should be. |
prob_scenario |
A vector of two numbers, and the default is equal probability, i.e. |
noise |
Currently not implemented. |
transition_affected_niche |
Here we specify which transition probabilities (matrix elements) should be affected by the Niche values. We can specify the character string |
transition_affected_env |
Here we specify which transition probabilities (matrix elements) should be affected by and environmental and demographic stochasticity. To use no stochasticity and carry out deterministic modelling, we set this to Possible arguments: |
transition_affected_demogr |
Currently not implemented. |
env_stochas_type |
Do you want the environmental stochasticity to be normal or lognormal? Indicate 'normal' or 'lognormal' here. The default is a "normal" distribution. |
stages |
Character vector with names of stages of the transition matrices. |
sumweight |
Vector, which stages to count when calculating population sizes. Should be a vector of the same length as the number of stages. |
proportion_initial |
This is the initial proportion of individuals in all stages, and should be a vector of the same length as the number of stages, and should add to 1. |
density_individuals |
Density of individuals (all stages, including seeds) in each grid cell. This number is automatically multiplied by the column named 'area' in Populations, and should be in the same units as the area in the |
fraction_SDD |
Proportion of seeds with short-distance dispersal (contigous populations). |
fraction_LDD |
Proportion of seeds with long-distance dispersal, with the dispersal kernel. |
dispersal_constants |
Constants for LDD dispersal function as a vector in the format: |
no_yrs |
Length in years of each time period (each of the columns with niche values in the Nichemap is a time period). |
K |
Carrying capacity of populations. When populations are over the value in K (the number of individuals) they will reach carrying capacity, and will be reduced to the value of K. This takes place through a simple ceiling functionality. The carrying capacity of newly colonized cells is set to the mean carrying capacity supplied. If K is NULL, there is no carrying capacity limit in the simulations. In the demoniche model the K can be different for each (initial) population and each time period. If desired,K should correspond to either a vector of values with the same length as the number of populations, or a vector with the same length as the number of time periods (K for each timeperiod - the Niche values at each time period). It can also vary both for each population and each timeperiod, and should the be a matrix. |
Kweight |
The |
Ktype |
Currently ceiling only. |
The function returns a list with the specified model name, to be used in demoniche_model function. It is also saved in the working directory.
Please see the Manual for examples, available from http://demoniche.r-forge.r-project.org/pics/demoniche_manual.pdf
Hedvig Nenzen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.