step1_plot_PI {AccelStab}R Documentation

Plot Prediction Intervals

Description

Plot the stability data and visualise the predictions with prediction intervals.

Usage

step1_plot_PI(
  step1_down_object,
  xname = NULL,
  yname = NULL,
  xlim = NULL,
  ylim = NULL,
  ribbon = FALSE
)

Arguments

step1_down_object

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

xname

Label for the x-axis (optional).

yname

Label for the y-axis (optional).

xlim

x-axis limits (optional).

ylim

y-axis limits (optional).

ribbon

Add shade to prediction intervals (optional).

Details

Use the fit object obtained from the step1.down function to plot the stability data and visualise the predictions with prediction intervals applied. There is an option to view the prediction intervals as a ribbon. The prediction interval value is chosen in the step1.down function.

Value

Plot of stability data with prediction curves and prediction intervals.

Examples

#load antigenicity data
data(antigenicity)

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

#plot raw data with prediction curves and prediction intervals.
step1_plot_PI(step1_down_object = fit1, xlim = NULL, ylim = NULL,
 xname = "Time (Years)", yname = "Concentration", ribbon = TRUE)


[Package AccelStab version 2.0.1 Index]