getp0 function

getp0

getp0

Get initial conditions for parameters of UComp object

getp0(y, model = "llt/equal/arma(0,0)", periods = NA)

Arguments

  • y: a time series to forecast.
  • model: any valid UComp model without any ?.
  • periods: vector of fundamental period and harmonics required.

Returns

A set of parameters p0 of an object of class UComp

to use as input to UC, UCforecast or UCsetup.

Details

Provides initial parameters of a given model for the time series. They may be changed arbitrarily by the user to include as an input p0 to UC or UCforecast functions (see example below). There is no guarantee that the model will converge and selecting initial conditions should be used with care.

Examples

## Not run: p0 <- getp0(log(AirPassengers), model = "llt/equal/arma(0,0)") p0[1] <- 0 # p0[1] <- NA m <- UCforecast(log(AirPassengers), model = "llt/equal/arma(0,0)", p0 = p0) ## End(Not run)

See Also

UC, UCvalidate, UCfilter, UCsmooth, UCdisturb, UCcomponents, UChp

Author(s)

Diego J. Pedregal

  • Maintainer: Diego J. Pedregal
  • License: GPL-3
  • Last published: 2025-04-02

Useful links