Christian Hansen’s Research Page
Code for IVQR
Below are links to MATLAB and
Ox code for performing IVQR estimation and inference as developed in
“Instrumental Quantile Regression Inference for Structural and Treatment Effect
Models” (with Victor Chernozhukov) and “Instrumental Variable Quantile
Regression” (with Victor Chernozhukov).
Along with the code, each file contains examples illustrating how the
code may be implemented; the data for the examples may also be downloaded below.
1. MATLAB
Code
2. Ox
Code
Code for Weak
Instrument Robust Inference
Below are links for the Stata code and data used in the empirical example in “A
Simple Approach to Heteroskedasticity and Autocorrelation Robust Inference with
Weak Instruments” (with Victor Chernozhukov).
The data are taken from Acemoglu, Johnson, and
Robinson (2001) “The Colonial Origins of Comparative Development: An Empirical
Investigation”. The code illustrates the
basic procedure and may easily be modified for other data sets and to provide
inference that is robust to autocorrelation or clustering.
1. Stata Code for weak instrument robust inference
2. Data
Code for
Sensitivity Analysis for IV (from “Plausibly Exogenous”)
Below are links for Stata code that produces some of the results from
“Plausibly Exogenous” (with Tim Conley and Peter Rossi). The code illustrates the basic procedure and
may easily be modified for other data sets.
The file with the Stata code also includes
sample data.
1. Stata Code for IV sensitivity analysis
Working Papers
Only unpublished work appears
here. A complete list of research
including publications may be found on my CV.
1. “Finite-Sample
Inference In Econometric Models via Quantile Restrictions”, (with Victor
Chernozhukov and Michael Jansson, portions of this paper previously appeared in
a working version of the paper “An
IV Model of Quantile Treatment Effects” (.pdf file)) forthcoming Journal of Econometrics
2. “Admissible
Invariant Similar Tests for Instrumental Variables Regression” (with Victor
Chernozhukov and Michael Jansson) forthcoming Econometric Theory
3. “Estimation
with Many Instrumental Variables” (with Jerry Hausman and Whitney Newey,
formerly “Weak Instruments, Many Instruments, and Microeconometric Practice”)
forthcoming Journal of Business and
Economic Statistics
4. “Plausibly
Exogenous” (with Timothy Conley and Peter Rossi)
5. “Instrumental
Variables Regression with Flexible Distributions” (with James McDonald and
Whitney Newey) forthcoming Journal of
Business and Economic Statistics
6. “A
Penalty Function Approach to Bias Reduction in Nonlinear Panel Models with
Fixed Effects” (with C. Alan Bester) forthcoming Journal of Business and Economic Statistics
7. “Bias
Reduction for Bayesian and Frequentist Estimators” (with C. Alan Bester)
8. “Identification
of Marginal Effects in a Nonparametric Correlated Random Effects Model”
(with C. Alan Bester) forthcoming Journal
of Business and Economic Statistics
9. “Inference
with Dependent Data Using Cluster Covariance Estimators” (with C. Alan
Bester and Timothy Conley)
10. “Flexible
Correlated Random Effects Estimation in Panel Models with Unobserved
Heterogeneity” (with C. Alan Bester)
Other Material
Technical
Appendix for “Generalized Least Squares Inference in Panel and Multilevel
Models with Serial Correlation and Fixed Effects” Journal of Econometrics (October 2007).
Technical Appendix for “Asymptotic
Properties of a Robust Variance Matrix Estimator for Panel Data when T is
Large” Journal of Econometrics
(December 2007).
Working
paper version of "The Reduced Form: A Simple Approach to Inference with
Weak Instruments" (with Victor Chernozhukov, published as “The reduced
form: A simple approach to inference with weak instruments” Economics Letters, July 2008) with
additional tables and discussion excluded from published version.
Abstract for
Working Papers
“Finite-Sample
Inference In Econometric Models via Quantile Restrictions”, (with Victor
Chernozhukov and Michael Jansson, portions of this paper previously appeared in
a working version of the paper “An
IV Model of Quantile Treatment Effects” (.pdf file))
Under minimal assumptions finite-sample confidence
bands for quantile regression models can be constructed. These confidence bands
are based on the ``conditional pivotal property" of estimating equations
that quantile regression methods aim to solve and will provide valid
finite-sample inference for both linear and nonlinear quantile models
regardless of whether the covariates are endogenous or exogenous. The
confidence regions can be computed using MCMC, and confidence bounds for single
parameters of interest can be computed through a simple combination of
optimization and search algorithms. The methods may usefully complement
existing inference methods for quantile regression when the standard
assumptions fail or are suspect.
“Admissible
Invariant Similar Tests for Instrumental Variables Regression” (with Victor
Chernozhukov and Michael Jansson)
This paper studies a model widely used in the weak
instruments literature and establishes admissibility of the weighted average
power likelihood ratio tests recently derived by Andrews, Moreira,
and Stock (2004). The class of tests
covered by this admissibility result contains the
“Estimation
with Many Instrumental Variables” (with Jerry Hausman and Whitney Newey, formerly
“Weak Instruments, Many Instruments, and Microeconometric Practice”)
Using many valid instrumental variables has the
potential to improve efficiency but makes the usual inference procedures
inaccurate. We show that using the
Bekker (1994) standard errors improves accuracy. We obtain this finding in empirical work,
simulations, and in the asymptotic theory.
Use of the Bekker (1994) standard errors in t-ratios leads to an
asymptotic approximation order that is the same when the number of instrumental
variables grow as when the number of instruments is fixed. We also give a version of the Kleibergen
(2002) weak instrument statistic that is robust to many or many weak
instruments.
“Plausibly
Exogenous” (with Timothy Conley and Peter Rossi)
Instrumental variables (IVs) are widely used to
identify effects in models with potentially endogenous explanatory variables.
In many cases, the instrument exclusion restriction that underlies the validity
of the usual IV inference holds only approximately; that is, the instruments
are ‘plausibly exogenous.’ We introduce a method of relaxing the exclusion
restriction and performing sensitivity analysis with respect to the degree of
violation. This provides practical tools for applied researchers who want to
proceed with less-than-perfect instruments. We illustrate our approach with
empirical examples that examine the effect of 401(k) participation upon asset accumulation,
demand for margarine, and returns-to-schooling.
“Instrumental
Variables Regression with Flexible Distributions” (with James McDonald and
Whitney Newey)
Instrumental variables are often associated with low
estimator precision. This paper explores
efficiency gains which might be achievable using moment conditions which are
nonlinear in the disturbances using flexible parametric families for the error distributions. We show that these estimators can achieve the
semiparametric efficiency bound when the true error distribution is a member of
the parametric family.
“A
Penalty Function Approach to Bias Reduction in Nonlinear Panel Models with
Fixed Effects” (with C. Alan Bester)
In
this paper, we consider estimation of nonlinear panel data models that include
individual specific fixed effects.
Estimation of these models is complicated by the incidental parameters
problem: that is, noise in the estimation of the fixed effects when the time
dimension is short generally results in inconsistent estimates of the common
parameters due to the nonlinearity of the problem. We present a penalty for the objective
function that reduces the bias in the resulting point estimates. The penalty function involves only
cross-products of scores and the hessian matrix and so is simple to construct
in practice. The form of the penalty
also provides interesting intuition into how the bias reduction is
working. We present simulation results
that suggest that the penalized optimization approach may substantially reduce
the bias in nonlinear fixed effects models.
“Bias
Reduction for Bayesian and Frequentist Estimators” (with C. Alan Bester)
We show that in parametric
likelihood models the first order bias in the posterior mode and the posterior
mean can be removed using objective Bayesian priors. These bias-reducing priors are defined as the
solution to a set of differential equations which may not be available in
closed form. We provide a simple and
tractable data dependent prior that solves the differential equations
asymptotically and removes the first order bias. When we consider the posterior mode, this
approach can be interpreted as penalized maximum likelihood in a frequentist
setting. We illustrate the construction
and use of the bias-reducing priors in simple examples and a simulation study.
“Identification
of Marginal Effects in a Nonparametric Correlated Random Effects Model”
(with C. Alan Bester)
In this paper, we consider identification
and estimation of average marginal effects in a correlated random coefficients
model without imposing strong functional form assumptions on the structural
likelihood or the mixing distribution.
Identification is achieved through imposing that the mixing distribution
depends on observed covariates only through an index function and the
assumption that at least three time periods are available for each cross
sectional unit. We leave the functional
form of the index function unrestricted subject to smoothness conditions. We present identification results for this
model and consider estimation of the marginal effects of interest. We illustrate the use of the approach through
a brief empirical example which considers the relationship between insider
trading activity and trading volume.
“Inference
with Dependent Data Using Cluster Covariance Estimators” (with C. Alan
Bester and Timothy Conley)
This paper presents a novel
way to conduct inference using dependent data in time series, spatial, and
panel data applications. Our method involves constructing t and Wald statistics
utilizing a cluster covariance matrix estimator (CCE). We then use an
approximation that takes the number of clusters/groups as fixed and the number
of observations per group to be large and calculate limiting distributions of
the t and Wald statistics. This approximation is analogous to `fixed-b'
asymptotics of Kiefer and Vogelsang (2002, 2005) (KV)
for heteroskedasticity and autocorrelation consistent inference, but in our
case yields standard t and F distributions where the number of groups
essentially plays the role of sample size. We provide simulation evidence that
demonstrates our procedure outperforms conventional inference procedures and
performs comparably to KV.
“Flexible
Correlated Random Effects Estimation in Panel Models with Unobserved
Heterogeneity” (with C. Alan Bester)
In
this paper, we consider identification in a correlated random effects model for
panel data. We assume that the likelihood for each individual in the panel is
known up to a finite dimensional common parameter and an individual specific
parameter. We allow the distribution of unobserved individual specific effects
to depend on observed explanatory variables and make no assumptions about the
particular functional form of this dependence.
This leads to a semiparametric problem where the parameters include a
finite dimensional common parameter, θ and an infinite dimensional
conditional density, q, that describes the
distribution of unobserved individual specific effects. For a given likelihood,
we establish restrictions on the space of functions H for the distribution of
unobserved heterogeneity under which {θ,q} are identified. We show the model parameters may
be consistently estimated by sieve maximum likelihood for a fixed panel length,
T. The conditions on H, which include assumptions about the support of
explanatory variables and smoothness of q in its arguments, are relatively mild
and are similar to those required for nonparametric density estimation.