Learn R Programming

tsDyn (version 0.9-1)

LSTAR: Logistic Smooth Transition AutoRegressive model

Description

Logistic Smooth Transition AutoRegressive model.

Usage

lstar(x, m, d=1, steps=d, series, mL, mH, thDelay, 
          th, gamma, trace=TRUE, include="const", control=list(), starting.control=list(nTh=20))

lstar(series, m, d, steps, mL, mH, mTh, th, gamma, trace=TRUE, control=list())

lstar(series, m, d, steps, mL=m, mH=m, thVar, th, gamma, trace=TRUE, 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
mH
autoregressive order for 'high' regime (default: m). Must be
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 control list to optim
starting.control
further arguments for the grid search (dimension, bounds). See details below.

Value

  • An object of class nlar, subclass lstar, i.e. a list with fitted model informations.

synopsis

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())

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: [object Object],[object Object],[object Object]

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.

[object Object],[object Object],[object Object],[object Object],[object Object]

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

Run this code
#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!):
mod.lstar3 <- lstar(log10(lynx), m=1,  include="none", starting.control=list(gammaInt=c(1,2000), nGamma=50))
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)

Run the code above in your browser using DataLab