| Title: | Create Maps Forecasting Risk of Pest Occurrence |
|---|---|
| Description: | There are three different modules: (1) model fitting and selection using a set of the most commonly used equations describing developmental responses to temperature helped by already existing R packages ('rTPC') and nonlinear regression model functions from 'nls.multstart' (Padfield et al. 2021, <doi:10.1111/2041-210X.13585>), with visualization of model predictions to guide ecological criteria for model selection; (2) calculation of suitability thermal limits, which consist on a temperature interval delimiting the optimal performance zone or suitability; and (3) climatic data extraction and visualization inspired on previous research (Taylor et al. 2019, <doi:10.1111/1365-2664.13455>), with either exportable rasters, static map images or html, interactive maps. |
| Authors: | Darío San-Segundo Molina [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-7831-9623>), A. Márcia Barbosa [aut, cph] (ORCID: <https://orcid.org/0000-0001-8972-7713>), Antonio Jesús Pérez-Luque [aut, cph] (ORCID: <https://orcid.org/0000-0002-1747-0469>), Francisco Rodríguez-Sánchez [aut, cph] (ORCID: <https://orcid.org/0000-0002-7981-1599>) |
| Maintainer: | Darío San-Segundo Molina <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.1.2 |
| Built: | 2026-06-08 15:12:53 UTC |
| Source: | https://github.com/EcologyR/mappestRisk |
A modified data set from Table 1 in Satar and Yokomi (2002) on days of development for Brachycaudus schwartzi across different constant temperatures and life stages
data(aphid)data(aphid)
aphidA data frame with 7 rows and 5 columns.
The workflow is reproducible and available in /data-raw folder of the
mappestRisk GitHub repository,
which includes both the original summarized data set -satar_data.xlsx-
and the R script with the dev. days to dev. rate conversion
in prepare_aphid.R.
"Satar2002" refers to the source paper as cited below in section Source.
Temperature treatments (ºC).
Development days (i.e., days to fulfill development requirements from a life-stage to the following)
Rate of Development (1/days), the reciprocal of Development days, see dev_days
Life stage or instar evaluated. In this case, only data of the whole immature stages (i.e., nymphs) were used
Satar, S. and Yokomi, R. (2002). Effect of temperature and host on development of Brachycaudus schwartzi (Homoptera: Aphididae). Ann. Entomol. Soc. Am. 95: 597-602. doi:10.1603/0013-8746(2002)095[0597:EOTAHO]2.0.CO;2.
Licence: CC BY-NC 3.0 (modified material).
Table containing the available models to be fit using fit_devmodels().
These models come from two other packages:
devRate and
rTPC .
data("available_models")data("available_models")
available_modelsA data.frame/tibble with 13 rows and 6 columns:
Model name to be used within fit_devmodels().
names of the packages used by fit_devmodels() to obtain
appropriate start values for the user-provided data.
When the package is rTPC package,
start values are automatically computed with rTPC::get_start_vals(),
which in turn relies on nls.multstart::nls_multstart().
When the package is devRate package,
iterative starting values are computed using nls.multstart::nls_multstart(),
using the parameters published in devRate::devRateEqStartVal()
as first attempts to iterate.
As an exception, if model_name == "briere1", generic starting values are provided
and advised to the user due to the unrealistic value of some parameters in the
devRate data set.
name of the function in the source packages rTPC and devRate.
formulas used for model fitting.
Rebaudo, F., Struelens, Q., and Dangles, O. (2018). Modelling temperature-dependent
development rate and phenology in arthropods: The devRate package for R.
Methods Ecol Evol. 9: 1144-1150. doi:10.1111/2041-210X.12935.
Padfield, D., O´Sullivan, H., and Pawar, S., (2021). rTPC and nls.multstart:
a new pipeline to fit thermal performance curves in R. Methods Ecol Evol. 12: 1138-1143.
doi:10.1111/2041-210X.13585.
Country names
country_namescountry_names
country_namesA character vector of country names (length = 231 countries)
https://gadm.org
Fit nonlinear regression models to data representing how development rate changes
with temperature (known as Thermal Performance Curves), based on
nls.multstart::nls_multstart() approach to development rate data across temperatures.
The fitting procedure is built upon previous packages for starting values estimation,
namely rTPC and devRate.
fit_devmodels(temp = NULL, dev_rate = NULL, model_name = NULL)fit_devmodels(temp = NULL, dev_rate = NULL, model_name = NULL)
temp |
a vector of temperatures used in the experiment. It should have at least four different temperatures and must contain only numbers without any missing values. |
dev_rate |
a vector of estimated development rates corresponding to each temperature.
These rates are calculated as the inverse of the number of days to complete the transition
from the beginning of a certain life stage to the beginning of the following at each temperature.
It must be numeric and of the same length as |
model_name |
a string or a vector that specifies the model(s) to use for fitting the Thermal Performance Curves. Options include "all" or specific models listed in available_models. These models typically exhibit a common unimodal, left-skewed shape. |
A table in tibble format with estimates and standard errors
for each parameter of the models specified by the user that have adequately
converged. Models are sorted based on their Akaike Information Criterion (AIC) values,
with the best fitting models shown first. Fitted models are also provided in list format
in the model_list column and can be accessed using get_fitted_model() for
for further inspection.
It is important to consider ecological criteria alongside statistical information.
For additional help in model selection,
we recommend using plot_devmodels() and consulting relevant literature.
The dataset used in the example was originally published in Satar & Yokomi (2022) under the CC-BY-NC license. The start values and equations for the 'briere1', 'lactin1', 'mod_polynomial' and 'wang' models have been obtained from the devRate package.
Angilletta, M.J., (2006). Estimating and comparing thermal performance curves. J. Therm. Biol. 31: 541-545. (for model selection in TPC framework)
Padfield, D., O'Sullivan, H. and Pawar, S. (2021). rTPC and nls.multstart:
A new pipeline to fit thermal performance curves in R. Methods Ecol Evol. 12: 1138-1143.
Rebaudo, F., Struelens, Q. and Dangles, O. (2018). Modelling temperature-dependent
development rate and phenology in arthropods: The devRate package for R.
Methods Ecol Evol. 9: 1144-1150.
Satar, S. and Yokomi, R. (2002). Effect of temperature and host on development of Brachycaudus schwartzi (Homoptera: Aphididae). Ann. Entomol. Soc. Am. 95: 597-602.
nls.multstart::nls_multstart() for structure of model fitting approach
browseVignettes("rTPC") for model names, start values searching workflows and
bootstrapping procedures using both rTPC and nls.multstart packages.
data("aphid") fitted_tpcs <- fit_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, model_name = c("lactin2", "briere2", "mod_weibull") ) head(fitted_tpcs)data("aphid") fitted_tpcs <- fit_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, model_name = c("lactin2", "briere2", "mod_weibull") ) head(fitted_tpcs)
Get fitted model object
get_fitted_model(fitted_df = NULL, model_name = NULL)get_fitted_model(fitted_df = NULL, model_name = NULL)
fitted_df |
A table with fitted models, as produced by |
model_name |
Character. Name of a fitted model, see available_models. |
A model object
data("aphid") fitted_tpcs_aphid <- fit_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, model_name = c("lactin2", "briere2", "ratkowsky") ) get_fitted_model(fitted_tpcs_aphid, "briere2")data("aphid") fitted_tpcs_aphid <- fit_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, model_name = c("lactin2", "briere2", "ratkowsky") ) get_fitted_model(fitted_tpcs_aphid, "briere2")
This function produces a raster map where each pixel shows the number of
months per year in which temperature is within a given set of bounds. If
the input has several pairs of minimum and maximum temperatures (as
produced by therm_suit_bounds()), the output raster has two layers: mean
and standard deviation.
map_risk( t_vals = NULL, t_rast = NULL, region = NULL, res = 2.5, path = NULL, mask = TRUE, verbose = FALSE, plot = TRUE, interactive = FALSE )map_risk( t_vals = NULL, t_rast = NULL, region = NULL, res = 2.5, path = NULL, mask = TRUE, verbose = FALSE, plot = TRUE, interactive = FALSE )
t_vals |
a |
t_rast |
Optional 12-layer |
region |
Optional object specifying the region to map. Must overlap the
extent of |
res |
Argument to pass to |
path |
Argument to pass to |
mask |
Logical value to pass to |
verbose |
Logical value specifying whether to display messages about what the function is doing at possibly slow steps. The default is FALSE. Setting it to TRUE can be useful for checking progress when maps are large. |
plot |
Logical value specifying whether to plot the results in a map.
Defaults to TRUE. Note that the function will always return a |
interactive |
Logical value specifying whether the plotted map should be interactive (if plot=TRUE). The default is TRUE if the 'leaflet' package is installed. |
This function returns a terra::SpatRaster() with up to 2 layers:
the (mean()) number of months with temperature within the species' thermal
bounds; and (if t_vals has >1 rows) the standard deviation (stats::sd()) around
that mean.
data("aphid") fitted_tpcs <- fit_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, model_name = "all") plot_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, species = "Brachycaudus schwartzi", life_stage = "Nymphs") boot_tpcs <- predict_curves(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, model_name_2boot = c("lactin2", "briere2", "beta"), propagate_uncertainty = TRUE, n_boots_samples = 10) print(boot_tpcs) plot_uncertainties(temp = aphid$temperature, dev_rate = aphid$rate_value, bootstrap_tpcs = boot_tpcs, species = "Brachycaudus schwartzi", life_stage = "Nymphs") boundaries <- therm_suit_bounds(preds_tbl = boot_tpcs, model_name = "lactin2", suitability_threshold = 80) risk_map_reunion <- map_risk(t_vals = boundaries, path = tempdir(), region = "Réunion", mask = TRUE, plot = TRUE, interactive = FALSE, verbose = TRUE)data("aphid") fitted_tpcs <- fit_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, model_name = "all") plot_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, species = "Brachycaudus schwartzi", life_stage = "Nymphs") boot_tpcs <- predict_curves(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, model_name_2boot = c("lactin2", "briere2", "beta"), propagate_uncertainty = TRUE, n_boots_samples = 10) print(boot_tpcs) plot_uncertainties(temp = aphid$temperature, dev_rate = aphid$rate_value, bootstrap_tpcs = boot_tpcs, species = "Brachycaudus schwartzi", life_stage = "Nymphs") boundaries <- therm_suit_bounds(preds_tbl = boot_tpcs, model_name = "lactin2", suitability_threshold = 80) risk_map_reunion <- map_risk(t_vals = boundaries, path = tempdir(), region = "Réunion", mask = TRUE, plot = TRUE, interactive = FALSE, verbose = TRUE)
Plot the predicted development rates across temperatures based on fitted Thermal Performance Curves (TPCs) for one or several models displayed in facets.
plot_devmodels( temp = NULL, dev_rate = NULL, fitted_parameters = NULL, species = NULL, life_stage = NULL )plot_devmodels( temp = NULL, dev_rate = NULL, fitted_parameters = NULL, species = NULL, life_stage = NULL )
temp |
a vector of temperatures used in the experiment. It should have at least four different temperatures and must contain only numbers without any missing values. |
dev_rate |
a vector of estimated development rates corresponding to each temperature.
These rates are calculated as the inverse of the number of days to complete the transition
from the beginning of a certain life stage to the beginning of the following at each temperature.
It must be numeric and of the same length as |
fitted_parameters |
a |
species |
optional a string of the target species that will constitute the plot title. Must be of type "character". |
life_stage |
optional a string of the target life stage that will constitute the plot subtitle. Must be of type "character". |
A plot with predicted values (development rate) across temperatures
for models that have adequately converged using fit_devmodels() function.
It's a ggplot object, which can be assigned to a user-defined object.
Angilletta, M.J., (2006). Estimating and comparing thermal performance curves. J. Therm. Biol. 31: 541-545. (for model selection in TPC framework)
Padfield, D., O'Sullivan, H. and Pawar, S. (2021). rTPC and nls.multstart:
A new pipeline to fit thermal performance curves in R. Methods Ecol Evol. 12: 1138-1143.
Rebaudo, F., Struelens, Q. and Dangles, O. (2018). Modelling temperature-dependent
development rate and phenology in arthropods: The devRate package for R.
Methods Ecol Evol. 9: 1144-1150.
Satar, S. and Yokomi, R. (2002). Effect of temperature and host on development of Brachycaudus schwartzi (Homoptera: Aphididae). Ann. Entomol. Soc. Am. 95: 597-602.
fit_devmodels() for fitting Thermal Performance Curves to
development rate data, which is in turn based on nls.multstart::nls_multstart().
data("aphid") fitted_tpcs <- fit_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, model_name = c("lactin2", "briere2", "mod_weibull")) plot_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, species = "Brachycaudus schwartzi", life_stage = "Nymphs")data("aphid") fitted_tpcs <- fit_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, model_name = c("lactin2", "briere2", "mod_weibull")) plot_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, species = "Brachycaudus schwartzi", life_stage = "Nymphs")
Draw bootstrapped Thermal Performance Curves (TPCs) to visualize uncertainty in parameter estimation of TPC fitting
plot_uncertainties( temp = NULL, dev_rate = NULL, bootstrap_tpcs = NULL, species = NULL, life_stage = NULL, alpha = 0.2 )plot_uncertainties( temp = NULL, dev_rate = NULL, bootstrap_tpcs = NULL, species = NULL, life_stage = NULL, alpha = 0.2 )
temp |
a vector of temperatures used in the experiment. It should have at least four different temperatures and must contain only numbers without any missing values. |
dev_rate |
a vector of estimated development rates corresponding to each temperature.
These rates are calculated as the inverse of the number of days to complete the transition
from the beginning of a certain life stage to the beginning of the following at each temperature.
It must be numeric and of the same length as |
bootstrap_tpcs |
a |
species |
optional a string of the target species that will constitute the plot title. Must be of type "character". |
life_stage |
optional a string of the target life stage that will constitute the plot subtitle. Must be of type "character". |
alpha |
a number between 0 and 1 to choose transparency of the bootstrapped curves (0 = complete transparency, 1 = solid line). |
A ggplot object containing the visual representation of the estimate TPC and the bootstrapped uncertainty curves as a ribbon. Each model is represented in a facet, and data points are also explicit.
Angilletta, M.J., (2006). Estimating and comparing thermal performance curves. J. Therm. Biol. 31: 541-545. (for model selection in TPC framework)
Padfield, D., O'Sullivan, H. and Pawar, S. (2021). rTPC and nls.multstart:
A new pipeline to fit thermal performance curves in R. Methods Ecol Evol. 12: 1138-1143.
Rebaudo, F., Struelens, Q. and Dangles, O. (2018). Modelling temperature-dependent
development rate and phenology in arthropods: The devRate package for R.
Methods Ecol Evol. 9: 1144-1150.
Satar, S. and Yokomi, R. (2002). Effect of temperature and host on development of Brachycaudus schwartzi (Homoptera: Aphididae). Ann. Entomol. Soc. Am. 95: 597-602.
browseVignettes("rTPC") for model names, start values searching workflows, and
bootstrapping procedures using both rTPC::get_start_vals() and nls.multstart::nls_multstart()
fit_devmodels() for fitting Thermal Performance Curves to development rate data,
which is in turn based on nls.multstart::nls_multstart().
predict_curves() for bootstrapping procedure based on the above-mentioned rTPC vignettes.
data("aphid") fitted_tpcs <- fit_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, model_name = "all") plot_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, species = "Brachycaudus swartzi", life_stage = "Nymphs") boot_tpcs <- predict_curves(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, model_name_2boot = c("lactin2", "briere2", "beta"), propagate_uncertainty = TRUE, n_boots_samples = 10) print(boot_tpcs) plot_uncertainties(temp = aphid$temperature, dev_rate = aphid$rate_value, bootstrap_tpcs = boot_tpcs, species = "Brachycaudus schwartzi", life_stage = "Nymphs")data("aphid") fitted_tpcs <- fit_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, model_name = "all") plot_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, species = "Brachycaudus swartzi", life_stage = "Nymphs") boot_tpcs <- predict_curves(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, model_name_2boot = c("lactin2", "briere2", "beta"), propagate_uncertainty = TRUE, n_boots_samples = 10) print(boot_tpcs) plot_uncertainties(temp = aphid$temperature, dev_rate = aphid$rate_value, bootstrap_tpcs = boot_tpcs, species = "Brachycaudus schwartzi", life_stage = "Nymphs")
Propagate parameter uncertainty of TPC fits using bootstrap with residual resampling
predict_curves( temp = NULL, dev_rate = NULL, fitted_parameters = NULL, model_name_2boot = NULL, propagate_uncertainty = TRUE, n_boots_samples = 100 )predict_curves( temp = NULL, dev_rate = NULL, fitted_parameters = NULL, model_name_2boot = NULL, propagate_uncertainty = TRUE, n_boots_samples = 100 )
temp |
a vector of temperatures used in the experiment. It should have at least four different temperatures and must contain only numbers without any missing values. |
dev_rate |
a vector of estimated development rates corresponding to each temperature.
These rates are calculated as the inverse of the number of days to complete the transition
from the beginning of a certain life stage to the beginning of the following at each temperature.
It must be numeric and of the same length as |
fitted_parameters |
a |
model_name_2boot |
A vector of strings including one or several TPC models
fitted by |
propagate_uncertainty |
A logical argument that specifies whether to
propagate parameter uncertainty by bootstrap with residual resampling.
If |
n_boots_samples |
Number of bootstrap resampling iterations (default is 100).
A larger number of iterations makes the resampling procedure more robust,
but typically 100 is sufficient for propagating parameter uncertainty,
as increasing |
A tibble object with as many curves (TPCs) as the number of iterations provided
in the n_boots_samples argument if propagate_uncertainty = TRUE minus the bootstrap samples that
could not be fitted (i.e., new nonlinear regression models did not converge for them).
Otherwise, it returns just one prediction TPC from model fit estimates.
Each resampled TPC consists of a collection of predictions for a set of temperatures
from temp - 20 to temp + 15 with a resolution of 0.1°C and a unique identifier
called boots_iter. In addition to the uncertainty TPCs, the estimated TPC
is also explicit in the output tibble.
Angilletta, M.J., (2006). Estimating and comparing thermal performance curves. J. Therm. Biol. 31: 541-545. (for model selection in TPC framework)
Padfield, D., O'Sullivan, H. and Pawar, S. (2021). rTPC and nls.multstart:
A new pipeline to fit thermal performance curves in R. Methods Ecol Evol. 12: 1138-1143.
Rebaudo, F., Struelens, Q. and Dangles, O. (2018). Modelling temperature-dependent
development rate and phenology in arthropods: The devRate package for R.
Methods Ecol Evol. 9: 1144-1150.
Satar, S. and Yokomi, R. (2002). Effect of temperature and host on development of Brachycaudus schwartzi (Homoptera: Aphididae). Ann. Entomol. Soc. Am. 95: 597-602.
browseVignettes("rTPC") for model names, start values searching workflows, and
bootstrapping procedures using both rTPC::get_start_vals() and nls.multstart::nls_multstart()
fit_devmodels() for fitting Thermal Performance Curves to development rate data,
which is in turn based on nls.multstart::nls_multstart().
data("aphid") fitted_tpcs <- fit_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, model_name = "all") plot_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, species = "Brachycaudus schwartzi", life_stage = "Nymphs") boot_tpcs <- predict_curves(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, model_name_2boot = c("lactin2", "briere2", "beta"), propagate_uncertainty = TRUE, n_boots_samples = 10) head(boot_tpcs)data("aphid") fitted_tpcs <- fit_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, model_name = "all") plot_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, species = "Brachycaudus schwartzi", life_stage = "Nymphs") boot_tpcs <- predict_curves(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, model_name_2boot = c("lactin2", "briere2", "beta"), propagate_uncertainty = TRUE, n_boots_samples = 10) head(boot_tpcs)
Calculate thermal boundaries that define the suitable region of a Thermal Performance Curve (TPC) corresponding to a user-defined optimal performance level.
therm_suit_bounds( preds_tbl = NULL, model_name = NULL, suitability_threshold = NULL )therm_suit_bounds( preds_tbl = NULL, model_name = NULL, suitability_threshold = NULL )
preds_tbl |
a |
model_name |
character. Name of one or several of the TPC models fitted
first in |
suitability_threshold |
A numeric value from 50 to 100 representing
the quantile of the curve that provides the user-defined optimal performance.
For instance, setting |
A tibble with six columns:
model_name: A string indicating the selected TPC model used for projections.
suitability: A string indicating the suitability threshold in percentage
(see suitability_threshold).
tval_left: A number representing the lower thermal boundary delimiting
the suitable region of the TPC.
tval_right: A number representing the upper thermal boundary delimiting
the suitable region of the TPC.
pred_suit: A number corresponding to the predicted development rate value
determining the chosen quantile threshold of the maximum rate
(i.e., suitability percentage of maximum rate).
iter: A string determining the TPC identity from the bootstrapping
procedure in predict_curves() function, or estimate when it represents
the estimated TPC fitted in fit_devmodels().
Angilletta, M.J., (2006). Estimating and comparing thermal performance curves. J. Therm. Biol. 31: 541-545. (for model selection in TPC framework)
Padfield, D., O'Sullivan, H. and Pawar, S. (2021). rTPC and nls.multstart:
A new pipeline to fit thermal performance curves in R. Methods Ecol Evol. 12: 1138-1143.
Rebaudo, F., Struelens, Q. and Dangles, O. (2018). Modelling temperature-dependent
development rate and phenology in arthropods: The devRate package for R.
Methods Ecol Evol. 9: 1144-1150.
Satar, S. and Yokomi, R. (2002). Effect of temperature and host on development of Brachycaudus schwartzi (Homoptera: Aphididae). Ann. Entomol. Soc. Am. 95: 597-602.
browseVignettes("rTPC") for model names, start values searching workflows, and
bootstrapping procedures using both rTPC::get_start_vals() and nls.multstart::nls_multstart()
fit_devmodels() for fitting Thermal Performance Curves to development rate data,
which is in turn based on nls.multstart::nls_multstart().
predict_curves() for bootstrapping procedure based on the above-mentioned rTPC vignettes.
data("aphid") fitted_tpcs <- fit_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, model_name = "all") plot_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, species = "Brachycaudus schwartzi", life_stage = "Nymphs") boot_tpcs <- predict_curves(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, model_name_2boot = c("lactin2", "briere2", "beta"), propagate_uncertainty = TRUE, n_boots_samples = 10) print(boot_tpcs) plot_uncertainties(temp = aphid$temperature, dev_rate = aphid$rate_value, bootstrap_tpcs = boot_tpcs, species = "Brachycaudus schwartzi", life_stage = "Nymphs") boundaries <- therm_suit_bounds(preds_tbl = boot_tpcs, model_name = "lactin2", suitability_threshold = 80) head(boundaries)data("aphid") fitted_tpcs <- fit_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, model_name = "all") plot_devmodels(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, species = "Brachycaudus schwartzi", life_stage = "Nymphs") boot_tpcs <- predict_curves(temp = aphid$temperature, dev_rate = aphid$rate_value, fitted_parameters = fitted_tpcs, model_name_2boot = c("lactin2", "briere2", "beta"), propagate_uncertainty = TRUE, n_boots_samples = 10) print(boot_tpcs) plot_uncertainties(temp = aphid$temperature, dev_rate = aphid$rate_value, bootstrap_tpcs = boot_tpcs, species = "Brachycaudus schwartzi", life_stage = "Nymphs") boundaries <- therm_suit_bounds(preds_tbl = boot_tpcs, model_name = "lactin2", suitability_threshold = 80) head(boundaries)