Learn R Programming

BeeGUTS (version 1.5.0)

predict.beeSurvFit: Predict method for beeSurvFit objects

Description

This is the generic predict S3 method for the beeSurvFit class. It predict the survival over time for the concentration profiles entered by the user. No concentration reconstructions are performed here. Functions odeGUTS::predict_ode() from the morse package is used. This might be changed in a future update

Usage

# S3 method for beeSurvFit
predict(object, dataPredict, ...)

Value

A beeSurvPred object containing the results of the forwards prediction

Arguments

object

An object of class beeSurvFit

dataPredict

Data to predict in the format as a dataframe containing the following column:

  • time: A vector of time in days

  • conc: A vector of number of survivors of same length

  • replicate A vector replicate name

...

Additional arguments to be parsed to the predict.survFit method from odeGUTS (e.g. mcmc_size = 1000 is to be used to reduce the number of mcmc samples in order to speed up the computation. mcmc_size is the number of selected iterations for one chain. Default is 1000. If all MCMC is wanted, set argument to NULL. hb_value = FALSE the background mortality hb is set to a fixed value. If TRUE, parameter hb taken from the posterior (If more than one dataset is present, use the optional argument hb_dataset to specify which hb to use). The default is FALSE. hb_valueFORCED = 0 hb_valueFORCED If hb_value is FALSE, it fix hb. The default is 0

Examples

Run this code
# \donttest{
dataPredict <- data.frame(time = c(1:5, 1:15),
                          conc = c(rep(5, 5), rep(15, 15)),
                          replicate = c(rep("rep1", 5), rep("rep2", 15)))
data(fitBetacyfluthrin_Chronic)
prediction <- predict(fitBetacyfluthrin_Chronic, dataPredict)
# }

Run the code above in your browser using DataLab