getp0: getp0

View source: R/UCS3functions.R

getp0R Documentation

getp0

Description

Get initial conditions for parameters of UComp object

Usage

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.

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 UCmodel functions (see example below). There is no guarantee that the model will converge and selecting initial conditions should be used with care.

Value

A set of parameters p0 of an object of class UComp to use as input to UC, UCmodel or UCsetup.

Author(s)

Diego J. Pedregal

See Also

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

Examples

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

## End(Not run)

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

Related to getp0 in UComp...