Learn R Programming

pmml (version 2.1.0)

pmml.ARIMA: Generate PMML for an ARIMA object the forecast package.

Description

Generate PMML for an ARIMA object the forecast package.

Usage

# S3 method for ARIMA
pmml(model, model_name = "ARIMA_model",
  app_name = "SoftwareAG PMML Generator",
  description = "ARIMA Time Series Model", copyright = NULL,
  transforms = NULL, missing_value_replacement = NULL, ...)

Arguments

model

an ARIMA object from the package forecast.

model_name

A name to be given to the PMML model.

app_name

The name of the application that generated the PMML.

description

A descriptive text for the Header element of the PMML.

copyright

The copyright notice for the model.

transforms

Data transformations.

missing_value_replacement

Value to be used as the 'missingValueReplacement' attribute for all MiningFields.

...

Further arguments passed to or from other methods.

Value

PMML representation of the ARIMA object.

Details

The model is represented in the PMML TimeSeriesModel format with conditional least squares forecasting. Note that ARIMA models in R are estimated using a state space formulation.

Transforms are currently not supported for ARIMA models.

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab