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                          

3.  Data for examples

 

4.  Stata Code available from Le Wang at University of New Hampshire

 

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.  Plausibly Exogenous” (with Timothy Conley and Peter Rossi)

2.  Bias Reduction for Bayesian and Frequentist Estimators” (with C. Alan Bester)

3.  Inference with Dependent Data Using Cluster Covariance Estimators” (with C. Alan Bester and Timothy Conley)

4.  Fixed-b Asymptotics for Spatially Dependent Robust Nonparametric Covariance Matrix Estimators” (with C. Alan Bester, Timothy Conley, and Timothy Vogelsang)

5.  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).

Derivation of F-statistic Result for “Asymptotic Properties of a Robust Variance Matrix Estimator for Panel Data when T is Large” Journal of Econometrics (December 2007) contributed by Mark Watson and James Stock.  I am deeply indebted to Stock and Watson for pointing this result out to me that they established while working on their paper “Heteroskedasticity-Robust Standard Errors for Fixed Effect Panel Data Regression” (Econometrica, 2008).  I am also embarrassed that a citation to their paper does not appear in the published version of my paper.

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

 

 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.

 

 

 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.

 

 

 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.

 

 

Fixed-b Asymptotics for Spatially Dependent Robust Nonparametric Covariance Matrix Estimators” (with C. Alan Bester, Timothy Conley, and Timothy Vogelsang)

 

                This paper develops a method for performing inference using spatially dependent data. We consider test statistics formed using nonparametric covariance matrix estimators that account for heteroskedasticity and spatial correlation (spatial HAC). We provide distributions of commonly used test statistics under “fixed-b" asymptotics, in which HAC smoothing parameters are proportional to the sample size. Under this sequence, spatial HAC estimators are not consistent but converge to non-degenerate limiting random variables that depend on the HAC smoothing parameters and kernel. We show that the limit distributions of commonly used test statistics are pivotal but non-standard, so critical values must be obtained by simulation. We provide a simple and general simulation procedure based on the i.i.d. bootstrap that can be used to obtain critical values. We illustrate the potential gains of the new approximation through simulations and an empirical example that examines the effect of unjust dismissal doctrine on temporary help services employment.

 

 

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.