Integrate IPM for growth and survival function at a specific climate for a species on a basal area variation.
Arguments
- species
The species names to be registered in the object
- climate
Named vector of the environmental variables used in the fitted model. Was data_plot_pred before.
- clim_lab
Label for climatic used. This values will be matched when simulating multiple species together.
- fit
Fitted model for growth and survival of the species and climate given. Functions will depend on size and basal area.
- mesh
vector of mesh variables. m is the number of bins, L is the minimum size and U the maximum size. h will be defined in the function as \(h <- (U - L) / m\).
- BA
Vector of basal area to integrate on. Integrating on 0 is important so use it. Integrating above 200 is absurd.
- correction
Correction to apply to the IPM matrix for eviction. Choices none (default), constant, ceiling and sizeExtremes.
- level
Number of point to use for integration in a cell during Gauss-Legendre integration. This value will be divided by 3 since size t is integrated at level = 3 and size t+1 at level = level/3. single int (default 420).
- diag_tresh
Threshold for Gauss-Legendre integration, which a distance to the diagonal. Number of cell integrated is the number of cell for which size t+1 - size t is inferior to this threshold. single dbl (default 50).
- midbin_tresh
Number of cells external to the GL integration to integrate with the mid bin method.
- mid_level
Number of point to use for integration in a cell during mid bin integration.
- year_delta
Number of year between 2 obersavtion when using this model. default 1, single int. NOTE : value for dev usage only !
- IsSurv
Adding survival to the IPM. Set to FALSE is useful to test for eviction of the model. TRUE by default.
- delay
the number of time delay to add. By default, it will use the delay stored in the
fit
object provided, but can be provided.- verbose
Print message. FALSE by default
Details
The check between climate variables and fitted variable will assert if all variables in the model are provided expect variables derived from "size" (size, size2, logsize), "intercept" and "BATOTcomp". An error will be triggered if the climate variable is missing.
One can desactivate each kind of integration with some treshold values. A negative value in diag_tresh (ex: -1) will cancel the Gauss-Legendre integration and a midbin_tresh null value (ex: 0) will cancel the midbin integration.