tor_predict: Model predictions

View source: R/tor_predict.R

tor_predictR Documentation

Model predictions

Description

tor_predict() The function provides the predicted M and 95% credible interval boundaries at a defined Ta given a certain model, in euthermic and/or torpid state.

Usage

tor_predict(tor_obj, Ta, CI = TRUE)

Arguments

tor_obj

a fitted model from tor_fit()

Ta

a vector of temperature

CI

whether or not to compute prediction intervals (default = TRUE, which reduces the speed of computation noticeably for large jobs)

Details

Note that the predictions are computed slightly differently depending on whether one uses CI = TRUE or CI = FALSE. In the former case (the default), for each value of Ta, one prediction is computed for every single iteration of the posteriors and the median value of these predictions is then computed. In the latter case, for each value of Ta, a single prediction is directly computed by assuming that parameters equate their median values from the corresponding posterior distribution.

Value

a data.frame

See Also

Other predict: eut_predict_fun(), tor_assign(), tor_predict_fun()

Examples

## Not run: 
test_mod <- tor_fit(M = test_data2[,2],
                    Ta = test_data2[, 1],
                    fitting_options = list(nc = 1, nb = 3000, ni = 5000))
tor_predict(test_mod, Ta = 10:35)
tor_predict(test_mod, Ta = 10:35, CI = FALSE)

## End(Not run)

vullioud/toRpoR documentation built on Nov. 30, 2024, 11:13 a.m.