Extraction functions for 'isat' objects

Share:

Description

Extraction functions for objects of class 'isat'

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
  ## S3 method for class 'isat'
coef(object, ...)
  ## S3 method for class 'isat'
fitted(object, ...)
  ## S3 method for class 'isat'
logLik(object, ...)
  ## S3 method for class 'isat'
plot(x, col=c("red","blue"), lty=c("solid","solid"),
    lwd=c(1,1), coef.path=TRUE, ...)
  ## S3 method for class 'isat'
predict(object, n.ahead=12, newmxreg=NULL, newindex=NULL,
    return=TRUE, plot=TRUE, plot.options=list(), ...)
  ## S3 method for class 'isat'
print(x, ...)
  ## S3 method for class 'isat'
residuals(object, std=FALSE, ...)
  ## S3 method for class 'isat'
summary(object, ...)
  ## S3 method for class 'isat'
vcov(object, ...)

Arguments

object

an object of class 'isat'

x

an object of class 'isat'

std

logical. If FALSE (default), then the mean residuals are returned. If TRUE, then the standardised residuals are returned

n.ahead

generate forecasts up to n steps ahead (the default is 12)

newmxreg

a matrix (n.ahead rows and NCOL(mxregs) columns) with the out-of-sample values of the mxreg regressors

newindex

date-index for the zoo object returned by predict.arx

return

logical. If TRUE (default), then the out-of-sample forecasts are returned

plot

logical. If TRUE (default), then the out-of-sample forecasts are plotted

plot.options

a list of options related to the plotting of forecasts, see 'Details'

col

colours of fitted (default=red) and actual (default=blue) lines

lty

types of fitted (default=solid) and actual (default=solid) lines

lwd

widths of fitted (default=1) and actual (default=1) lines

coef.path

logical. Only applicable if there are retained indicators after the application of isat

...

additional arguments

Details

The plot.options argument is a list that can contain any of the following arguments:

keep: integer greater than zero (default is 10) that controls the number of in-sample actual values to plot
fitted: If TRUE, then the fitted values as well as actual values are plotted in-sample. The default is FALSE
errors.only: logical or NULL (the default). If TRUE, then only mean forecasts are plotted when spec is set to "both"
legend.loc: character string (the default is "topleft"). Allows the location of the plot legend to be altered
newmactual: numeric vector or NULL (default). Enables the plotting of actual values out-of-sample in addition to the forecasts

Value

coef:

numeric vector containing parameter estimates

fitted:

a zoo object with fitted values

logLik:

a numeric, the log-likelihood (normal density)

plot:

plot of the fitted values and the residuals

predict

a vector containing the out-of-sample forecasts

print:

a print of the estimation results

residuals:

a zoo object with the residuals

summary:

a print of the items in the isat object

vcov:

variance-covariance matrix

Author(s)

Felix Pretis, http://www.felixpretis.org/
James Reade, https://sites.google.com/site/jjamesreade/
Genaro Sucarrat, http://www.sucarrat.net/

See Also

paths, terminals, coef.gets, getsm, arx

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
##step indicator saturation:
set.seed(123)
y <- rnorm(30)
isatmod <- isat(y)

##print results:
print(isatmod)

##plot the fitted vs. actual values, and the residuals:
plot(isatmod)

##print the entries of object 'isatmod':
summary(isatmod)

##extract coefficients of the simplified (specific) model:
coef(isatmod)

##extract log-likelihood:
logLik(isatmod)

##extract variance-covariance matrix of simplified
##(specific) model:
vcov(isatmod)

##extract and plot the fitted values:
mfit <- fitted(isatmod)
plot(mfit)

##extract and plot (mean) residuals:
epshat <- residuals(isatmod)
plot(epshat)

##extract and plot standardised residuals:
zhat <- residuals(isatmod, std=TRUE)
plot(zhat)

##generate forecasts with the simplified
##(specific) model:
predict(isatmod)