### Description

VARMAX (Vector Autoregressive Moving Average model with eXogenous variables)
extends the ARMA/ARIMA model in two ways:

To work with time series with multiple response variables (vector time series).

To work with exogenous variables, or variables that are independent of the other variables in the system.

### Usage

td_varmax_mle ( data = NULL, response.columns = NULL, exogenous.columns = NULL, partition.columns = NULL, orders = NULL, seasonal.orders = NULL, period = NULL, exogenous.order = NULL, lag = 0, include.mean = FALSE, max.iter.num = 100, step.ahead = NULL, method = "SSE", data.orders = NULL, include.drift = FALSE, order.p = NULL, order.d = NULL, order.q = NULL, seasonal.order.p = NULL, seasonal.order.d = NULL, seasonal.order.q = NULL, data.sequence.column = NULL, data.orders.sequence.column = NULL, data.partition.column = "1", data.orders.partition.column = "1", data.order.column = NULL, data.orders.order.column = NULL )

### Arguments

`data` |
Required Argument. |

`data.partition.column` |
Optional Argument |

`data.order.column` |
Required Argument. |

`data.orders` |
Optional Argument. |

`data.orders.partition.column` |
Optional Argument |

`data.orders.order.column` |
Optional Argument. |

`response.columns` |
Required Argument. |

`exogenous.columns` |
Optional Argument. |

`partition.columns` |
Optional Argument. |

`orders` |
Optional Argument. This argument is required if "data.orders" and ("order.p",
"orders.d", "orders.q") are not specified. |

`seasonal.orders` |
Optional Argument. |

`period` |
Optional Argument. This argument is required if "seasonal.orders" or
("seasonl.orders.p", "seasonal.orders.d", "seasonal.orders.d") is specified. |

`exogenous.order` |
Optional Argument. |

`lag` |
Optional Argument. Yi is a vector of n response variables Xi is a vector of m exegenous variables
Default Value: 0 |

`include.mean` |
Optional Argument. |

`max.iter.num` |
Optional Argument. |

`step.ahead` |
Optional Argument. |

`method` |
Optional Argument. SSE: Sum of squared error. ML: Maximum likelihood.
Default Value: "SSE" |

`include.drift` |
Optional Argument. This argument can only be TRUE when d is non-zero and less than 2.
This argument cannot be specified along with the "data.orders" arugment.
Default Value: FALSE |

`order.p` |
Optional Argument. This argument is required if "data.orders" and "orders"
are not specified. |

`order.d` |
Optional Argument. This argument is required if "data.orders" and "orders"
are not specified. |

`order.q` |
Optional Argument.This argument is required if "data.orders" and "orders" are
not specified. |

`seasonal.order.p` |
Optional Argument. |

`seasonal.order.d` |
Optional Argument. |

`seasonal.order.q` |
Optional Argument. |

`data.sequence.column` |
Optional Argument. |

`data.orders.sequence.column` |
Optional Argument. |

### Value

Function returns an object of class "td_varmax_mle" which is a named
list containing object of class "tbl_teradata".

Named list member can be referenced directly with the "$" operator
using the name: result.

### Examples

# Get the current context/connection con <- td_get_context()$connection # Load example data. loadExampleData("varmax_example", "finance_data3", "orders_ex") # Create object(s) of class "tbl_teradata". finance_data3 <- tbl(con, "finance_data3") orders_ex <- tbl(con, "orders_ex") # Example 1 - Without "exogenous.columns" argument. varmax_out1 <- td_varmax_mle(data = finance_data3, data.partition.column = c("id"), data.order.column = c("period"), response.columns = c("expenditure","income","investment"), partition.columns = c("id"), orders = "1,1,1", include.mean = FALSE, step.ahead = 3 ) # Example 2 - Without "seasonal.orders" argument. varmax_out2 <- td_varmax_mle(data = finance_data3, data.partition.column = c("id"), data.order.column = c("period"), response.columns = c("expenditure"), exogenous.columns = c("income","investment"), partition.columns = c("id"), orders = "1,1,1", exogenous.order = 3, lag = 3, include.mean = FALSE, step.ahead = 3 ) # Example 3 - With both "orders" and "seasonal.orders" arguments. varmax_out3 <- td_varmax_mle(data = finance_data3, data.partition.column = c("id"), data.order.column = c("period"), response.columns = c("expenditure"), exogenous.columns = c("income","investment"), partition.columns = c("id"), orders = "1,1,1", seasonal.orders = "1,0,0", period = 4, exogenous.order = 3, lag = 3, include.mean = FALSE, step.ahead = 3 ) # Example 4 - Using "data.orders" arguments. varmax_out4 <- td_varmax_mle(data = finance_data3, data.partition.column = c("id"), data.order.column = c("period"), response.columns = c("expenditure"), partition.columns = c("id"), max.iter.num = 1000, method = "ML", data.orders = orders_ex, data.orders.partition.column = c("id") ) # Example 5 - Using "order.p", "order.d" and "order.q" arguments. varmax_out5 <- td_varmax_mle(data = finance_data3, data.partition.column = c("id"), data.order.column = c("period"), response.columns = c("expenditure"), exogenous.columns = c("income","investment"), partition.columns = c("id"), order.p = 1, order.d = 1, order.q = 1, seasonal.orders = "1,0,0", period = 4, exogenous.order = 3, lag = 3, include.mean = FALSE, step.ahead = 3 ) # Example 6 - Using "seasonal.order.p", "seasonal.order.d" and "seasonal.order.q" arguments. varmax_out6 <- td_varmax_mle(data = finance_data3, data.partition.column = c("id"), data.order.column = c("period"), response.columns = c("expenditure"), exogenous.columns = c("income","investment"), partition.columns = c("id"), orders = "1,1,1", seasonal.order.p = 1, seasonal.order.d = 0, seasonal.order.q = 0, period = 4, exogenous.order = 3, lag = 3, include.mean = FALSE, step.ahead = 3 )