VLSTAR: VLSTAR- Estimation

Description Usage Arguments Details Value Author(s) References Examples

View source: R/VLSTAR.R

Description

This function allows the user to estimate the coefficients of a VLSTAR model with m regimes through maximum likelihood or nonlinear least squares. The set of starting values of Gamma and C for the convergence algorithm can be either passed or obtained via searching grid.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
VLSTAR(
  y,
  exo = NULL,
  p = 1,
  m = 2,
  st = NULL,
  constant = TRUE,
  starting = NULL,
  method = c("ML", "NLS"),
  n.iter = 500,
  singlecgamma = FALSE,
  epsilon = 10^(-3),
  ncores = NULL
)

Arguments

y

data.frame or matrix of dependent variables of dimension (Txn)

exo

(optional) data.frame or matrix of exogenous variables of dimension (Txk)

p

lag order

m

number of regimes

st

single transition variable for all the equation of dimension (Tx1)

constant

TRUE or FALSE to include or not the constant

starting

set of intial values for Gamma and C, inserted as a list of length m-1. Each element of the list should contain a data.frame with 2 columns (one for Gamma and one for c), and n rows.

method

Fitting method: maximum likelihood or nonlinear least squares.

n.iter

number of iteration of the algorithm until forced convergence

singlecgamma

TRUE or FALSE to use single gamma and c

epsilon

convergence check measure

ncores

Number of cores used for parallel computation. Set to NULL by default and automatically calculated.

Details

The multivariate smooth transition model is an extension of the smooth transition regression model introduced by Bacon and Watts (1971) (see also Anderson and Vahid, 1998). The general model is

y_{t} = μ_0+∑_{j=1}^{p}Φ_{0,j}\,y_{t-j}+A_0 x_t \cdot G_t(s_t;γ,c)[μ_{1}+∑_{j=1}^{p}Φ_{1,j}\,y_{t-j}+A_1x_t]+\varepsilon_t

where μ_{0} and μ_{1} are the \tilde{n} \times 1 vectors of intercepts, Φ_{0,j} and Φ_{1,j} are square \tilde{n}\times\tilde{n} matrices of parameters for lags j=1,2,…,p, A_0 and A_1 are \tilde{n}\times k matrices of parameters, x_t is the k \times 1 vector of exogenous variables and \varepsilon_t is the innovation. Finally, G_t(s_t;γ,c) is a \tilde{n}\times \tilde{n} diagonal matrix of transition function at time t, such that

G_t(s_t;γ,c)=\{G_{1,t}(s_{1,t};γ_{1},c_{1}),G_{2,t}(s_{2,t};γ_{2},c_{2}), …,G_{\tilde{n},t}(s_{\tilde{n},t};γ_{\tilde{n}},c_{\tilde{n}})\}.

Each diagonal element G_{i,t}^r is specified as a logistic cumulative density functions, i.e.

G_{i,t}^r(s_{i,t}^r; γ_i^r, c_i^r) = ≤ft[1 + \exp\big\{-γ_i^r(s_{i,t}^r-c_i^r)\big\}\right]^{-1}

for i = 1,2, …, \tilde{n} and r=0,1,…,m-1, so that the first model is a Vector Logistic Smooth Transition AutoRegressive (VLSTAR) model. The ML estimator of θ is obtained by solving the optimization problem

\hat{θ}_{ML} = arg \max_{θ}log L(θ)

where log L(θ) is the log-likelihood function of VLSTAR model, given by

ll(y_t|I_t;θ)=-\frac{T\tilde{n}}{2}\ln(2π)-\frac{T}{2}\ln|Ω|-\frac{1}{2}∑_{t=1}^{T}(y_t-\tilde{G}_tB\,z_t)'Ω^{-1}(y_t-\tilde{G}_tB\,z_t)

The NLS estimators of the VLSTAR model are obtained by solving the optimization problem

\hat{θ}_{NLS} = arg \min_{θ}∑_{t=1}^{T}(y_t - Ψ_t'B'x_t)'(y_t - Ψ_t'B'x_t).

Generally, the optimization algorithm may converge to some local minimum. For this reason, providing valid starting values of θ is crucial. If there is no clear indication on the initial set of parameters, θ, this can be done by implementing a grid search. Thus, a discrete grid in the parameter space of Γ and C is create to obtain the estimates of B conditionally on each point in the grid. The initial pair of Γ and C producing the smallest sum of squared residuals is chosen as initial values, then the model is linear in parameters. The algorithm is the following:

  1. Construction of the grid for Γ and C, computing Ψ for each poin in the grid

  2. Estimation of \hat{B} in each equation, calculating the residual sum of squares, Q_t

  3. Finding the pair of Γ and C providing the smallest Q_t

  4. Once obtained the starting-values, estimation of parameters, B, via nonlinear least squares (NLS)

  5. Estimation of Γ and C given the parameters found in step 4

  6. Repeat step 4 and 5 until convergence.

Value

An object of class VLSTAR, with standard methods.

Author(s)

Andrea Bucci

References

Anderson H.M. and Vahid F. (1998), Testing multiple equation systems for common nonlinear components. Journal of Econometrics. 84: 1-36

Bacon D.W. and Watts D.G. (1971), Estimating the transition between two intersecting straight lines. Biometrika. 58: 525-534

Terasvirta T. and Yang Y. (2014), Specification, Estimation and Evaluation of Vector Smooth Transition Autoregressive Models with Applications. CREATES Research Paper 2014-8

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(Realized)
y <- Realized[-1,1:10]
y <- y[-nrow(y),]
st <- Realized[-nrow(Realized),1]
st <- st[-length(st)]
stvalues <- startingVLSTAR(y, p = 1, n.combi = 3,
 singlecgamma = FALSE, st = st, ncores = 1)
fit.VLSTAR <- VLSTAR(y, p = 1, singlecgamma = FALSE, starting = stvalues,
 n.iter = 1, st = st, method ='NLS', ncores = 1)
# a few methods for VLSTAR
print(fit.VLSTAR)
summary(fit.VLSTAR)
plot(fit.VLSTAR)
predict(fit.VLSTAR, st.num = 1, n.ahead = 1)
logLik(fit.VLSTAR, type = 'Univariate')
coef(fit.VLSTAR)

starvars documentation built on Jan. 18, 2022, 1:08 a.m.