Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: times
See also: armacls armalik ariols arimacls arimaf

Quantlet: arima11
Description: estimates the ARIMA(1,d,1) process by Maximum Likelihood and computes diagnostics. Residuals diagnostics include their time plot with two-standard error bounds, correlograms and Ljung-Box statistics with p-values. Parameter diagnostics include their t-statistics with p-values and variance-covariance matrix. Computed model selection criteria are AIC and BIC.

Reference(s):

Usage: A = arima11(y,d,const{,rcheck{,pcheck{,msc}}})
Input:
y input series of length n
d integer, order of differences
const string, a constant is included if const = "constant"
rcheck optional string, residual diagnostic checking, if rcheck = "rcheck", residual diagnostics are calculated and plots of the residuals and the corresponding correlograms are displayed, if rcheck = "prcheck", the plots are omitted
pcheck optional string, parameter diagnostic statistics are computed if pcheck = "pcheck"
msc optional string, if msc = "msc" the model selection criteria are computed.
Output:
A.b estimated parameters. If const="constant", the first element represents the estimated mean of a stationary ARMA(1,1) process.
A.bst asymptotic standard deviations. If const="constant", the first element is the asymptotic standard deviation of the mean of a stationary ARMA(1,1) process.
A.wnv estimated variance of the innovations.
A.checkr if rcheck="prcheck", list containing the residual diagnostics: 1. res = n-p x 1 vector of residuals (i.e., one step ahead prediction errors computed with estimated parameters), 2. stat = scalar with statistic for testing H0: zero mean innovations (asymptotically normal under H0) and 3. acfQ = 30 x 4 matrix with the residuals acf, Ljung-Box statistics with p-values and pacf. The p-values are computed for M>2, and the first 2 values are filled with zeros. if rcheck = "rcheck", the output contains all of the above mentioned residual diagnostics and plots additionally the residuals and their acf and pacf (correlograms). Otherwise, checkr is a list containing the residuals.
A.checkp if pcheck="pcheck", list containing the parameter diagnostics: 1. est = string that informs if the estimated process is not stationary (|phi|>=1). If the stationarity condition holds the string est takes value 0. 2. inv = string that informs if the estimated process is not invertible (|theta|>=1). If the invertibility condition holds the string inv takes value 0. 3. bt = 2 x 2 or 3 x 2 matrix of t-statistics and p-values (normal cdf) for testing ARMA parameter significance. If const = "constant", the first element represents the statistic for testing zero mean ARMA(1,1) process 4. bvar = covariance matrix of ARMA parameter estimates. Otherwise, checkp = 0.
A.ic if msc="msc", 2 x 1 vector containing two model selection criteria: the Akaike Information Criterion, AIC, and the Schwarz Information Criterion, SIC. Otherwise, ic = 0.

Example:
; Example 1
library("times")            ; loads the quantlets from times library
randomize(0)                ; sets a seed
y = genarma(0.7,0.5,normal(400))      ; ARMA(1,1) series with mean=0
est = arima11(y,0,"noconstant","prcheck","pcheck")
est.b~est.bst~est.checkp.bt ; estimates, standard errors and t-stat.
est.checkp.est              ; stationary condition
est.checkp.inv              ; invertibility condition
est.wnv                     ; innovation variance estimate
est.checkr.acfQ[15,2:3]     ; residual Ljung-Box statistics M=15

Result:
Contents of _tmp
[1,]  0.7424   0.038131    19.47        0
[2,]  0.39132  0.052376   7.4714  7.9373e-14

Contents of est
[1,] "0"

Contents of inv
[1,] "0"

Contents of wnv
[1,]  0.93105

Contents of _tmp
[1,]   14.065  0.36931
Example:
; Example 2
library("times")            ; loads the quantlets from times library
randomize(0)                ; sets a seed
y = genarma(0.3,0.6,normal(300))      ; ARMA(1,1) series with mean=0
est = arima11(y,0,"constant","0","pcheck","msc")
est.b~est.bst~est.checkp.bt ; estimates with standard errors and t-statistics
est.checkp.bvar             ; covariance matrix of ARMA parameter estimates
est.checkr.res[1]           ; first residual
est.ic                      ; AIC and BIC

Result:
Contents of _tmp
[1,] -0.12808  0.11752  -1.0899  0.27576
[2,]  0.21442  0.07406   2.8952  0.0037887
[3,]  0.65375  0.057377   11.394        0

Contents of bvar
[1,]  0.0054849 -0.0027546
[2,] -0.0027546  0.0032921

Contents of _tmp
[1,] -0.99769

Contents of ic
[1,] -0.051801
[2,] -0.027049



Author: G. Moral, 20023101
(C) MD*TECH Method and Data Technologies, 05.02.2006