jive.est {SteinIV} | R Documentation |
The Jackknife Instrumental Variable Estimator (JIVE).
Description
Compute the JIVE for a multiple regression, as well as the set of standard errors for the individual vector entries, and the estimate of the asymptotic variance/covariance matrix.
Usage
jive.est(y,X,Z,SE=FALSE,n.bt=100)
Arguments
y |
Numeric: A vector of observations, representing the outcome variable. |
X |
Numeric: A matrix of observations, whose number of columns
corresponds to the number of predictors in the model, and the number
of rows should be conformal with the number of entries in |
Z |
Numeric: A matrix of observations representing the
intrumental variables (IVs) in the first-stage structural equation. The
number of IVs should be at least as large as the number of
endogenous variables in |
SE |
Logical: If TRUE, then the function also returns the standard errors of the individual JIVE estimators, and a bootstrap estimate of its asymptotic variance/covariance matrix. |
n.bt |
Numeric: The number of bootstrap samples performed for estimating the variance/covariance matrix. This automatically occurs, whenever the user selects the SE to be true. |
Details
The JIVE was originally introduced by Angrist et al. (1995), in order to reduce the finite-sample bias of the TSLS estimator, when applied to a large number of instruments. Indeed, the TSLS estimator tends to behave poorly as the number of instruments increases. We briefly outline this method. See Angrist et al. (1999) for an exhaustive description.
The model is identical to the one used in the rest of this package. That is,
the second-stage equation is modelled as y = X\beta + \epsilon,
in which y
is a vector of n
observations representing the
outcome variable, X
is a matrix of order n\times k
denoting the predictors of the model, and comprised of both exogenous
and endogenous variables, \beta
is the k
-dimensional
vector of parameters of interest; whereas \epsilon
is an unknown
vector of error terms.
Moreover, the first-stage level of the model is given by a multivariate
multiple regression. That is, this is a linear modle with a
multivariate outcome variable, as well as multiple
predictors. This first-stage model is represented in this manner,
X = Z\Gamma + \Delta
,
where X
is the matrix of predictors from the second-stage
equation, Z
is a matrix of instrumental variables (IVs) of order
n \times l
, \Gamma
is a matrix of unknown parameters of
order l\times k
; whereas \Delta
denotes an unknown matrix of order
n\times k
of error terms.
For computing the JIVE, we first consider the estimator of the regression parameter in the first-stage equation, which is denoted by
\hat\Gamma := ({Z}^{T}{Z})^{-1}({Z}^{T}{X}).
This matrix is of order l\times k
. The matrix of predictors, {X}
, projected
onto the column space of the instruments is then given by
\hat{X}={Z}\hat\Gamma
. The JIVE proceeds by
estimating each row of \hat{X}
without using the corresponding data
point. That is, the i
th row in the jackknife matrix, \hat{X}_{J}
,
is estimated without using the i
th row of {X}
.
This is conducted as follows. For every i=1,\ldots,n
, we first compute
\hat\Gamma_{(i)} :=
({Z}_{(i)}^{T}{Z}_{(i)})^{-1}({Z}_{(i)}^{T}{X}_{(i)}),
where {Z}_{(i)}
and {X}_{(i)}
denote matrices {Z}
and {X}
after
removal of the i
th row, such that these two matrices are of order
(n-1)\times l
and (n-1)\times k
, respectively. Then, the
matrix \hat{X}_{J}
is constructed by stacking these jackknife
estimates of \hat\Gamma
, after they have been pre-multiplied by the
corresponding rows of {Z}
,
\hat{X}_{J} :=
({z}_{1}\hat\Gamma_{(1)},\ldots,{z}_{n}\hat\Gamma_{(n)})^{T},
where each {z}_{i}
is an l
-dimensional row vector. The JIVE
estimator is then obtained by replacing \hat{X}
with
\hat{X}_{J}
in the standard formula of the TSLS, such that
\hat\beta_{J} := (\hat{X}_{J}{}^{T}{X})^{-1}(\hat{X}_{J}{}^{T}{y}).
In this package, we have additionally made use of the computational
formula suggested by Angrist et al. (1999), in which each row of
\hat{X}_{J}
is calculated using
{z}_{i}\hat\Gamma_{(i)} = \frac{{z}_{i}\hat\Gamma -
h_{i}{x}_{i}}{1-h_{i}},
where {z}_{i}\hat\Gamma_{(i)}
, {z}_{i}\hat\Gamma
and
{x}_{i}
are k
-dimensional row vectors; and with h_{i}
denoting
the leverage of the corresponding data point in the first-level
equation of our model, such that each h_{i}
is defined as
{z}_{i}({Z}^{T}{Z})^{-1}{z}_{i}^{T}
.
Value
list |
A list with one or three arguments, depending on whether the user has activated the SE flag. The first element (est) in the list is the TSLS estimate of the model in vector format. The second element (se) is the vector of standard errors; and the third element (var) is the sample estimate of the asymptotic variance/covariance matrix. |
Author(s)
Cedric E. Ginestet <cedric.ginestet@kcl.ac.uk>
References
Angrist, J., Imbens, G., and Krueger, A.B. (1995). Jackknife instrumental variables esti- mation. Technical Working Paper 172, National Bureau of Economic Research.
Angrist, J.D., Imbens, G.W., and Krueger, A.B. (1999). Jackknife instrumental variables estimation. Journal of Applied Econometrics, 14(1), 57–67.
Examples
### Generate a simple example with synthetic data, and no intercept.
n <- 100; k <- 3; l <- 3;
Ga<- diag(rep(1,l)); be <- rep(1,k);
Z <- matrix(0,n,l); for(j in 1:l) Z[,j] <- rnorm(n);
X <- matrix(0,n,k); for(j in 1:k) X[,j] <- Z[,j]*Ga[j,j] + rnorm(n);
y <- X%*%be + rnorm(n);
### Compute JIVE estimator with SEs and variance/covariance matrix.
print(jive.est(y,X,Z))
print(jive.est(y,X,Z,SE=TRUE));