Learn R Programming

UComp (version 4.0.1)

getp0: getp0

Description

Get initial conditions for parameters of UComp object

Usage

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

Value

A set of parameters p0 of an object of class UComp

to use as input to UC, UCmodel or UCsetup.

Arguments

y

a time series to forecast.

model

any valid UComp model without any ?.

periods

vector of fundamental period and harmonics required.

Author

Diego J. Pedregal

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.

See Also

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

Examples

Run this code
if (FALSE) {
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)
}

Run the code above in your browser using DataLab