Estimates and forecasts PTS general univariate models
PTSmodel(
y,
u = NULL,
model = "???",
s = frequency(y),
h = 2 * s,
criterion = "aicc",
lambda = 1,
armaIdent = FALSE,
verbose = FALSE
)
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
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).
a matrix of input time series. If
the output wanted to be forecast, matrix u
should contain future values for inputs.
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)
seasonal period of time series (1 for annual, 4 for quarterly, ...)
forecast horizon. If the model includes inputs h is not used, the lenght of u is used instead.
information criterion for identification ("aic", "bic" or "aicc").
Box-Cox lambda parameter (NULL: estimate)
check for arma models for error component (TRUE / FALSE).
intermediate estimation output (TRUE / FALSE)
Diego J. Pedregal
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.
PTS
, PTSsetup
, PTSvalidate
,
PTScomponents
, PTSestim
if (FALSE) {
m1 <- PTSmodel(log(AirPassengers))
}
Run the code above in your browser using DataLab