| LSTAR {tsDyn} | R Documentation |
Logistic Smooth Transition AutoRegressive model
Description
Logistic Smooth Transition AutoRegressive model.
Usage
lstar(x, m, d=1, steps=d, series, mL, mH, mTh, thDelay,
thVar, th, gamma, trace=TRUE, include = c("const", "trend","none", "both"),
control=list(), starting.control=list())
Arguments
x |
time series |
m, d, steps |
embedding dimension, time delay, forecasting steps |
series |
time series name (optional) |
mL |
autoregressive order for 'low' regime (default: m). Must be <=m |
mH |
autoregressive order for 'high' regime (default: m). Must be <=m |
thDelay |
'time delay' for the threshold variable (as multiple of embedding time delay d) |
mTh |
coefficients for the lagged time series, to obtain the threshold variable |
thVar |
external threshold variable |
th, gamma |
starting values for coefficients in the LSTAR model. If missing, a grid search is performed |
trace |
should additional infos be printed? (logical) |
include |
Type of deterministic regressors to include |
control |
further arguments to be passed as |
starting.control |
further arguments for the grid search (dimension, bounds). See details below. |
Details
x_{t+s} = ( \phi_{1,0} + \phi_{1,1} x_t + \phi_{1,2} x_{t-d} + \dots +
\phi_{1,mL} x_{t - (mL-1)d} ) G( z_t, th, \gamma ) +
( \phi_{2,0} + \phi_{2,1} x_t + \phi_{2,2} x_{t-d} + \dots + \phi_{2,mH}
x_{t - (mH-1)d} ) (1 - G( z_t, th, \gamma ) ) + \epsilon_{t+steps}
with z the threshold variable, and G the logistic function,
computed as plogis(q, location = th, scale = 1/gamma), so see
plogis documentation for details on the logistic function
formulation and parameters meanings.
The threshold variable can alternatively be specified by:
- mTh
-
z[t] = x[t] mTh[1] + x[t-d] mTh[2] + \dots + x[t-(m-1)d] mTh[m] - thDelay
-
z[t] = x[t - thDelay*d ] - thVar
-
z[t] = thVar[t]
Note that if starting values for phi1 and phi2 are provided, isn't
necessary to specify mL and mH. Further, the user has to specify only
one parameter between mTh, thDelay and thVar for indicating the
threshold variable.
Estimation of the transition parameters th and gamma, as well as the regression parameters phi1 and phi2, is done using concentrated least squares, as suggested in Leybourne et al. (1996).
Given th and gamma, the model is linear, so regression coefficients can be obtained as usual by OLS. So the nonlinear numerical search needs only to be done for th and gamma; the regression parameters are then recovered by OLS again from the optimal th and gamma.
For the nonlinear estimation of the
parameters th and gamma, the program uses the
optim function, with optimization method BFGS using the analytical gradient.
For the estimation of standard values, optim is re-run
using the complete Least Squares objective function, and the standard errors are obtained by inverting the hessian.
You can pass further arguments to optim directly with the control list argument. For instance, the option maxit maybe useful when
there are convergence issues (see examples).
Starting parameters are obtained doing a simple two-dimensional grid-search over th and gamma.
Parameters of the grid (interval for the values, dimension of the grid) can be passed to starting.control.
nThThe number of threshold values (th) in the grid. Defaults to 200
nGammaThe number of smoothing values (gamma) in the grid. Defaults to 40
trimThe minimal percentage of observations in each regime. Defaults to 10% (possible threshold values are between the 0.1 and 0.9 quantile)
gammaIntThe lower and higher smoothing values of the grid. Defaults to c(1,40)
thIntThe lower and higher threshold values of the grid. When not specified (default, i.e NA), the interval are the
trimquantiles above.
Value
An object of class nlar, subclass lstar, i.e. a list
with fitted model informations.
Author(s)
Antonio, Fabio Di Narzo
References
Non-linear time series models in empirical finance, Philip Hans Franses and Dick van Dijk, Cambridge: Cambridge University Press (2000).
Non-Linear Time Series: A Dynamical Systems Approach, Tong, H., Oxford: Oxford University Press (1990).
Leybourne, S., Newbold, P., Vougas, D. (1998) Unit roots and smooth transitions, Journal of Time Series Analysis, 19: 83-97
See Also
plot.lstar for details on plots produced for this model
from the plot generic.
Examples
#fit a LSTAR model. Note 'maxit': slow convergence
mod.lstar <- lstar(log10(lynx), m=2, mTh=c(0,1), control=list(maxit=3000))
mod.lstar
#fit a LSTAR model without a constant in both regimes.
mod.lstar2 <- lstar(log10(lynx), m=1, include="none")
mod.lstar2
#Note in example below that the initial grid search seems to be to narrow.
# Extend it, and evaluate more values (slow!):
controls <- list(gammaInt=c(1,2000), nGamma=50)
mod.lstar3 <- lstar(log10(lynx), m=1, include="none", starting.control=controls)
mod.lstar3
# a few methods for lstar:
summary(mod.lstar)
residuals(mod.lstar)
AIC(mod.lstar)
BIC(mod.lstar)
plot(mod.lstar)
predict(mod.lstar, n.ahead=5)