predict.quantile_baseline: Predict future disease incidence by resampling one-step-ahead...

View source: R/quantile_baseline.R

predict.quantile_baselineR Documentation

Predict future disease incidence by resampling one-step-ahead forecasts

Description

Predict future disease incidence by resampling one-step-ahead forecasts

Usage

## S3 method for class 'quantile_baseline'
predict(
  quantile_baseline,
  newdata,
  quantiles,
  horizon,
  nsim,
  origin = c("obs", "loess", "median"),
  n_origin = 7,
  force_nonneg = FALSE
)

Arguments

quantile_baseline

a quantile_baseline fit object

newdata

numeric vector of length at least one with incident counts

quantiles

quantile levels for which to generate predictions

horizon

number of time steps forward to predict

nsim

number of samples to use for generating predictions at horizons greater than 1

origin

string specifying whether to project forward from the most recent observation ("obs"), from the fitted value from a LOESS smooth ("loess") based on a window of size ⁠n_origin``, or from the median of the last ⁠n_origin⁠ observed values (⁠"median"')

n_origin

number of data points used in a window for a LOESS fit or for calculating the median. Defaults to 7, which seems reasonable for daily data.

force_nonneg

boolean; if TRUE, results are forced to be non-negative

cum_data

numeric vector of length at least one with cumulative counts

Value

matrix of samples of incidence


reichlab/simplets documentation built on Sept. 16, 2024, 10:24 p.m.