$$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]