predict_inactivation_MCMC {bioinactivation}R Documentation

Dynamic Prediction Intervals from a Monte Carlo Adjustment

Description

Given a model adjustment of a dynamic microbial inactivation process performed using any of the functions in bioinactivation calculates probability intervals at each time point using a Monte Carlo method.

Usage

predict_inactivation_MCMC(fit_object, temp_profile, n_simulations = 100,
  times = NULL, quantiles = c(2.5, 97.5), additional_pars = NULL)

Arguments

fit_object

An object of classes FitInactivationMCMC, IsoFitInactivation or FitInactivation.

temp_profile

data frame with discrete values of the temperature for each time. It must have one column named time and another named temperature providing discrete values of the temperature at time points.

n_simulations

a numeric indicating how many Monte Carlo simulations to perform. 100 by default.

times

numeric vector specifying the time points when results are desired. If NULL, the times in MCMC_fit$best_prediction are used. NULL by default.

quantiles

numeric vector indicating the quantiles to calculate in percentage. By default, it is set to c(2.5, 97.5) which generates a prediction interval with confidence 0.95. If NULL, the quantiles are not calculated and all the simulations are returned.

additional_pars

Additional parameters not included in the adjustment (e.g. the initial number of microorganism in an isothermal fit).

Value

A data frame of class PredInactivationMCMC. On its first column, time at which the calculation has been made is indicated. If quantiles = NULL, the following columns contain the results of each simulation. Otherwise, the second and third columns provide the mean and median of the simulations at the given time point. Following columns contain the quantiles of the results.


[Package bioinactivation version 1.2.3 Index]