predict2 {BeeGUTS}R Documentation

Predict method for beeSurvFit objects

Description

This is an updated predict 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

predict2(
  object,
  dataPredict,
  userhb_value = 0,
  calib_hb = FALSE,
  ndatahb = 1,
  ...
)

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

userhb_value

User defined background mortality rate parameter. If a single value is provided, a single fixed value is used. If an array of two elements is give, the first element is the hb value and the second element is the approximate value of the desired 97.5% upperlimit on hb.

calib_hb

Logical argument. If TRUE uses for the predictions the background mortality value of the calibration dataset. Default value is FALSE.

ndatahb

Used in combination with calib_hb=TRUE in case the calibration object has multiple datasets. The value dictates which hb value to use (between the different dataset).

...

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.

Value

A beeSurvPred object containing the results of the forwards prediction

Examples


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 <- predict2(fitBetacyfluthrin_Chronic, dataPredict)


[Package BeeGUTS version 1.3.0 Index]