fit_simple_ts: Estimate model

View source: R/estimation.R

fit_simple_tsR Documentation

Estimate model

Description

Estimate model

Usage

fit_simple_ts(
  y,
  ts_frequency = 1,
  model = "quantile_baseline",
  transformation = "box-cox",
  transform_offset = 0.5,
  d = 0,
  D = 0,
  ...
)

Arguments

y

a univariate time series or numeric vector.

ts_frequency

frequency of time series. Must be provided if y is not of class "ts". See the help for stats::ts for more.

model

string specifying model to fit: one of 'quantile_baseline' or 'spline_smoother'

transformation

character specifying transformation type: "box-cox", "sqrt", "log", or "none". See details for more.

transform_offset

numeric offset used before the Box-Cox and log transformations; the offset is added to all observations before transforming. Default value of 0.5 allows us to use the Box-Cox and log transforms (which require positive inputs) in case of observations of 0, and also ensures that the reverse transformed values will always be at least -0.5, so that they round up to non-negative values.

d

integer order of first differencing; default is 0

D

integer order of seasonal differencing; default is 0

...

arguments passed on to model-specific fit method

Details

This function is a wrapper around model-specific fit methods, providing some preliminary transformations of the data. Formal and informal experimentation has shown these preliminary transformations to be helpful with a few infectious disease time series data sets.

Value

a simple_ts model fit


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