rlgtfit: rlgtfit class

View source: R/initialisation.R

rlgtfitR Documentation

rlgtfit class

Description

A constructor function for objects of class rlgtfit, the main class of the package. Objects of this class are output from the rlgt function. This constructor will usually not be called by users directly.

Usage

rlgtfit(
  y,
  model.type,
  use.regression,
  seasonalityMethodId,
  levelMethodId,
  useSmoothingMethodForError = FALSE,
  seasonality,
  seasonality2,
  rlgtmodel,
  params,
  control,
  samples
)

Arguments

y

time series data for training (provided as a vector or a ts object).

model.type

the type of rlgt model, one of: "LGT", "SGT", "S2GT"

use.regression

whether the data has any additional variables to be used with forecasting, i.e. multivariate time-series.

seasonalityMethodId

Seasonality method Id (0- HW, 1- generalized).

levelMethodId

Level method Id.

useSmoothingMethodForError

if the non-standard function for error size should be used, one based on smoothed innovations or surprises

seasonality

This specification of seasonality will be overridden by frequency of y, if y is of ts or msts class. 1 by default, i.e. no seasonality.

seasonality2

Second seasonality. If larger than 1, a dual seasonality model will be used. This specification of seasonality will be overridden by the second seasonality of y, if y is of msts class. 1 by default, i.e. no seasonality or single seasonality.

rlgtmodel

an rlgt model.

params

list of parameters of the model (to be fitted).

control

list of control parameters, i.e. hyperparameter values for the model's prior distribution. See rlgt.control

samples

stanfit object representing the MCMC samples

Value

an rlgtfit instance


Rlgt documentation built on Sept. 16, 2023, 1:08 a.m.