PTSsetup: PTSsetup

View source: R/PTSfunctions.R

PTSsetupR Documentation

PTSsetup

Description

Run up PTS general univariate MSOE models

Usage

PTSsetup(
  y,
  u = NULL,
  model = "???",
  s = frequency(y),
  h = 2 * s,
  criterion = "aic",
  lambda = 1,
  armaIdent = FALSE,
  verbose = FALSE
)

Arguments

y

a time series to forecast (it may be either a numerical vector or a time series object). This is the only input required. If a vector, the additional input s should be supplied compulsorily (see below).

u

a matrix of input time series. If the output wanted to be forecast, matrix u should contain future values for inputs.

model

the model to estimate. It is a single string indicating the type of model for each component with one or two letters:

  • Error: ? / N / A

  • Trend: ? / N / A / Ad / L

  • Seasonal: ? / N / A / D (trigonometric with different variances)

s

seasonal period of time series (1 for annual, 4 for quarterly, ...)

h

forecast horizon. If the model includes inputs h is not used, the lenght of u is used instead.

criterion

information criterion for identification ("aic", "bic" or "aicc").

lambda

Box-Cox lambda parameter (NULL: estimate)

armaIdent

check for arma models for error component (TRUE / FALSE).

verbose

intermediate estimation output (TRUE / FALSE)

Details

See help of PTS.

Value

An object of class PTS. It is a list with fields including all the inputs and the fields listed below as outputs. All the functions in this package fill in part of the fields of any PTS object as specified in what follows (function PTS fills in all of them at once):

After running PTSmodel or PTSestim:

  • p0: Initial values for parameter search

  • p: Estimated parameters

  • lambda: Estimated Box-Cox lambda parameter

  • v: Estimated innovations (white noise in correctly specified models)

  • yFor: Forecasted values of output

  • yForV: Variance of forecasted values of output

After running PTSvalidate:

  • table: Estimation and validation table

After running PTScomponents:

  • comp: Estimated components in matrix form

Standard methods applicable to PTS objects are print, summary, plot, fitted, residuals, logLik, AIC, BIC, coef, predict, tsdiag.

Author(s)

Diego J. Pedregal

See Also

PTS, PTSmodel, PTSvalidate, PTScomponents, PTSestim

Examples

## Not run: 
m1 <- PTSsetup(log(AirPassengers))

## End(Not run)

UComp documentation built on May 31, 2023, 7:41 p.m.

Related to PTSsetup in UComp...