ivregimes {hspm} | R Documentation |
Estimation of regime models with endogenous variables
Description
The function ivregimes
deals with
the estimation of regime models.
Most of the times the variable identifying the regimes
reveals some spatial aspects of the data (e.g., administrative boundaries).
The model includes exogenous as well as endogenous
variables among the regressors.
Usage
ivregimes(formula, data, rgv = NULL, vc = c("homoskedastic", "robust", "OGMM"))
Arguments
formula |
a symbolic description of the model of the form |
data |
the data of class |
rgv |
an object of class |
vc |
one of |
Details
The basic (non spatial) model with endogenous variables can be written in a general way as:
where ,
and the
vector
contains the observations
on the dependent variable for the first regime,
and the
vector
(with
)
contains the observations on the dependent variable for the second regime.
The
matrix
and the
matrix
are blocks of a block diagonal matrix,
the vectors of parameters
and
have
dimension
and
, respectively,
is the
matrix of regressors that do not vary by regime,
is a
vector of parameters.
The three matrices
(
),
(
) and
(
)
with corresponding vectors of parameters
,
and
,
contain the endogenous variables.
Finally,
is the
vector of innovations.
The model is estimated by two stage least square.
In particular:
If
vc = "homoskedastic"
, the variance-covariance matrix is estimated by, where
,
,
is the matrix of instruments, and
is the matrix of all exogenous and endogenous variables in the model.
If
vc = "robust"
, the variance-covariance matrix is estimated by, where
is a diagonal matrix with diagonal elements
, for
.
Finally, if
vc = "OGMM"
, the model is estimated in two steps. In the first step, the model is estimated by 2SLS yielding the residuals. With the residuals, the diagonal matrix
is estimated and is used to construct the matrix
. Then
, where
is the vector of all the parameters in the model, The variance-covariance matrix is:
.
Value
An object of class ivregimes
. A list
of five elements. The first element of the list contains the estimation results. The other elements are needed for printing the results.
Author(s)
Gianfranco Piras and Mauricio Sarrias
Examples
data("natreg")
form <- HR90 ~ 0 | MA90 + PS90 + RD90 + UE90 | 0 | MA90 + PS90 + RD90 + FH90 + FP89 + GI89
split <- ~ REGIONS
mod <- ivregimes(formula = form, data = natreg, rgv = split, vc = "robust")
summary(mod)
mod1 <- ivregimes(formula = form, data = natreg, rgv = split, vc = "OGMM")
summary(mod1)
form1 <- HR90 ~ MA90 + PS90 | RD90 + UE90 -1 | MA90 + PS90 | RD90 + FH90 + FP89 + GI89 -1
mod2 <- ivregimes(formula = form1, data = natreg, rgv = split, vc = "homoskedastic")
summary(mod2)