PTSmodel {UComp} | R Documentation |
PTSmodel
Description
Estimates and forecasts PTS general univariate models
Usage
PTSmodel(
y,
u = NULL,
model = "???",
s = frequency(y),
h = 2 * s,
criterion = "aicc",
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 |
u |
a matrix of input time series. If
the output wanted to be forecast, matrix |
model |
the model to estimate. It is a single string indicating the type of model for each component with one or two letters:
|
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
PTSmodel
is a function for modelling and forecasting univariate
time series according to Power-Trend-Seasonal (PTS).
It sets up the model with a number of control variables that
govern the way the rest of functions in the package work. It also estimates
the model parameters by Maximum Likelihood and forecasts the data.
Standard methods applicable to UComp objects are print, summary, plot,
fitted, residuals, logLik, AIC, BIC, coef, predict, tsdiag.
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
Author(s)
Diego J. Pedregal
See Also
PTS
, PTSsetup
, PTSvalidate
,
PTScomponents
, PTSestim
Examples
## Not run:
m1 <- PTSmodel(log(AirPassengers))
## End(Not run)