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: msarimaconvert msarimamodel

Quantlet: msarimacond
Description: calculates the sum of squares of an ARMA(p,q) model and some diagnostics. Thereby, the model is conditioned on the first p observations of y and the first q residuals are set to 0.


Usage: {S,dia} = msarimacond(y,phiconv,thetaconv,mu {,k})
y T x 1 vector of observed (stationary) time series
phiconv (p + 1) x 1 vector with the coefficients of the AR polynomial, first entry must be 1
thetaconv (q + 1) x 1 vector with the coefficients of the MA polynomial, first entry must be 1
mu scalar value of the constant in the ARMA model
k optional scalar, that gives the number of coefficients from the original model if the model is in expanded form.
S Sum of squares
dia list with the following entries: the variance of the residuals (s2), the coefficient of determination (R2), the adjusted R2 (aR2), the value of the log likelihood function (logl), the Akaike information criteria (AIC), the Schwarz information criteria (SIC) and the series of the residuals (a). You retrieve the different elements by extending the list name with ".'name given in braces'".


library("times")               ; loads the quantlets from library times
G = read("airline")            ; loads the airline data
arma   = list(0,1,-0.3776)     ; list with coefficient for MA(1) part
season = list(12,0,1,-0.5728)  ; list with coefficient for seasonal MA part
msarimamodelOut = msarimamodel((1|1),arma,season)               ; sets the model
{y,phiconv,thetaconv,k}= msarimaconvert(log(G),msarimamodelOut) ; expands the model
mu = mean(y)
{S,dia} = msarimacond(y,phiconv,thetaconv,mu,k) ; calculates the conditional sum of squares
dia.s2                         ; variance of the residuals
dia.R2                         ; coefficient of determination
dia.aR2                        ; adjusted R2
dia.logl                       ; value of the log likelihood function
dia.AIC                        ; Akaike information criteria
dia.SIC                        ; Schwarz information criteria

Sum of squares and diagnostics calculated for the Box and Jenkins
airline model. Coefficients are theta_1 = -0.3776 and theta_s,1 = -0.5728.

Contents of S
[1,]  0.18191

Contents of s2
[1,]  0.0014101

Contents of R2
[1,]  0.33433

Contents of aR2
[1,]  0.32917

Contents of logl
[1,]   245.07

Contents of AIC
[1,]   -3.711

Contents of SIC
[1,]  -3.6672

Author: R. Chen, R. Schulz, 20020409
(C) MD*TECH Method and Data Technologies, 05.02.2006