excursion {AccelStab}R Documentation

Temperature Excursion

Description

Predict a temperature excursion for a product.

Usage

excursion(
  step1_down_object,
  temp_changes,
  time_changes,
  CI = TRUE,
  PI = TRUE,
  draw = 10000,
  confidence_interval = 0.95,
  intercept = NULL,
  ribbon = TRUE,
  xname = NULL,
  yname = NULL,
  plot_simulations = FALSE
)

Arguments

step1_down_object

The fit object from the step1.down function (required).

temp_changes

A list that represents the order of the temperatures that the product is subjected to. Must be the same length as time_changes.

time_changes

List that represents the times at which the temperature changes, Starts from time zero and must be the same length as temp_changes.

CI

Show confidence intervals.

PI

Show prediction intervals.

draw

Number of simulations used to estimate confidence intervals.

confidence_interval

Confidence level for the confidence and prediction intervals around the predictions (default 0.95).

intercept

Use a forced y-intercept. If null, the fitted value will be used.

ribbon

Add shade to confidence and prediction intervals (optional).

xname

Label for the x-axis (optional).

yname

Label for the y-axis (optional).

plot_simulations

If TRUE, randomly selects 100 of the simulations to display on the plot.

Details

Use the output from step1.down to run a temperature excursion prediction.

Value

An SB class object, a list including the following elements:

Examples

#load antigenicity
data(antigenicity)

#run step1.down fit
fit1 <- step1_down(data = antigenicity, y = "conc", .time = "time",
 C = "Celsius", max_time_pred = 3)

#run excursion function with fixed intercept.
excursion <- excursion(step1_down_object = fit1,
                       temp_changes = c(5,15,10),
                       time_changes = c(0.5,1.5,3),
                       CI = TRUE, PI = TRUE, draw = 4000,
                       confidence_interval = 0.95,
                       intercept = 80,
                       xname = "Time in years", yname = "Concentration",
                       ribbon = TRUE, plot_simulations = TRUE)

excursion$excursion_plot


[Package AccelStab version 2.0.1 Index]