Generate PMML for an ARIMA object the forecast package.
An ARIMA object from the package forecast.
A name to be given to the PMML model.
The name of the application that generated the PMML.
A descriptive text for the Header element of the PMML.
The copyright notice for the model.
A string specifying the model version.
Data transformations.
Value to be used as the 'missingValueReplacement' attribute for all MiningFields.
The type of time series representation for PMML: "arima" or "statespace".
Vector of confidence levels for prediction intervals.
Further arguments passed to or from other methods.
PMML representation of the ARIMA
object.
The model is represented as a PMML TimeSeriesModel.
When ts_type = "statespace"
(by default), the R object is exported as StateSpaceModel in PMML.
When ts_type = "arima"
, the R object is exported as ARIMA in PMML with conditional
least squares (CLS). Note that ARIMA models in R are
estimated using a state space representation. Therefore, when using CLS with seasonal models,
forecast results between R and PMML may not match exactly. Additionally, when ts_type="arima", prediction intervals
are exported for non-seasonal models only. For ARIMA models with d=2, the prediction intervals
between R and PMML may not match.
OutputField elements are exported with dataType "string", and contain a collection of all values up to and including the steps-ahead value supplied during scoring. String output in this form is facilitated by Extension elements in the PMML file, and is supported by Zementis Server since version 10.6.0.0.
cpi_levels
behaves similar to levels
in forecast::forecast
: values must be
between 0 and 100, non-inclusive.
Models with a drift term will be supported in a future version.
Transforms are currently not supported for ARIMA models.
if (FALSE) {
library(forecast)
# non-seasonal model
data("WWWusage")
mod <- Arima(WWWusage, order = c(3, 1, 1))
mod_pmml <- pmml(mod)
# seasonal model
data("JohnsonJohnson")
mod_02 <- Arima(JohnsonJohnson,
order = c(1, 1, 1),
seasonal = c(1, 1, 1)
)
mod_02_pmml <- pmml(mod_02)
# non-seasonal model exported with Conditional Least Squares
data("WWWusage")
mod <- Arima(WWWusage, order = c(3, 1, 1))
mod_pmml <- pmml(mod, ts_type = "arima")
}