*! version 2 4june2020

Title

ivcrc -- Instrumental variables correlated random coefficients estimator

Syntax

ivcrc depvar [varlist1]
(varlist_edg =
varlist2) [if] [in] [, options]

varlist1 is the list of exogenous explanatory variables.

varlist_edg is the list of (basic) endogenous explanatory variables.

varlist2 is the list of excluded exogenous variables to be used with varlist1 as instruments for varlist_edg.

Description

ivcrc implements the instrumental variables (IV) estimator for the linear correlated random coefficients (CRC) model
described in Benson, Masten, and Torgovitsky (2020). The linear CRC model is a generalization of the standard linear IV
model that allows for endogenous, multivalued treatments and unobserved heterogeneity in treatment effects.
ivrcr allows for flexible functional forms and permits instruments that may be binary, discrete, or continuous.
The command is based on semiparametric identification results described in Masten and Torgovitsky (2016), and draws
on computation, estimation, and asymptotic theory described in Masten and Torgovitsky (2014). The command also
allows for the estimation of varying coefficients regressions, which are closely related in structure.

Options

dendog(varlist) List of derived endogenous variables, known functions of varlist_edg.

bootstrap(options) Bootstrap confidence intervals and standard errors;
default setting is no standard errors.
Allows passing bootstrap command options, e.g. reps(#) or cluster(varlist).
Access additional post-estimation statistics via estat bootstrap.

kernel() Choose alternative kernel functions; default is the epanechnikov kernel.
Other options: uniform, triangle, biweight, triweight, cosine, and gaussian.

bandwidth() Bandwidth of kernel; default is rule-of-thumb. If multiple (comma separated) values are specified, estimates for each bandwidth are reported.
Sub-option: together with varcoef, specify the bandwidth for a varying coefficients model.

ranks(integer) Use (1/integer,...,1 - 1/integer) evenly spaced quantiles for
computing the conditional rank statistic; default is 50.

average(lb(g)ub) Options for numerical integration, with generalized numlist syntax lb(g)ub.
Specify average(lb(0)ub) to use the sample average method; default setting is average(0(0)1).
Specify non-zero values of g to use the grid method, e.g. average(.01(.01).99) to numerically integrate
over the grid (.01,.02,...,.99). The space of integration may be comprised of non-overlapping ascending subsets by
specifying comma separated lists. Sub-option: specifying average(lb1(g1)ub1,...,lbN(gN)ubN, report) returns estimates for each subset as well as estimates over their union.
Sub-option: together with varcoef, specify the support for kernel weights in a varying coefficients model.

generate(varname) Save conditional rank estimates to varname in the working dataset. This option is ignored when bootstrapping.

userank(varname) Use varname as the conditional rank statistic, bypassing rank estimation.

savecoef(filename) Creates a comma delimited (csv) dataset of the local rank-specific coefficient estimates, saved to filename.

varcoef(varlist) Estimate a varying coefficients model, in which coefficients are conditioned on covariates specified in varlist as an alternative to conditioning on the ranks of the basic endogenous variables varlist_edg. Options average and bandwidth are required with varcoef.

Examples

Using NLSYM data, available as part of Cameron and Trivedi (2010)

net from http://www.stata-press.com/data/musr

net install musr

net get musr

use mus06klingdata.dta

ivcrc wage76 (grade76 = col4 age76 agesq76)

ivcrc wage76 (grade76 = col4 age76 agesq76), bootstrap(reps(100))

ivcrc wage76 (grade76 = col4 age76 agesq76), bandwidth(.025) average(.05(0).95) kernel(uniform)

ivcrc wage76 (grade76 = col4 age76 agesq76), dendog(exp76 expsq76) quantiles(200) savecoef(localests)

ivcrc wage76 grade76 exp76 expsq76, varcoef(age76) bandwidth(2) average(30(0)50)

Author

David Benson, Board of Governors of the Federal Reserve System

(in collaboration with Matt Masten and Alexander Torgovitsky)

References

Benson, David, Matthew A. Masten, and Alexander Torgovitsk (2022). "ivcrc: An Instrumental-Variables Estimator for the Correlated Random-Coefficients Model." Stata Journal 22 (3), pp. 469-495.

Benson, David, Matthew A. Masten, and Alexander Torgovitsk (2020). “ivcrc: An Instrumental Variables Estimator for the Correlated Random Coefficients Model,” Finance and Economics Discussion Series 2020-046r1. Washington: Board of Governors of the Federal Reserve System, https://doi.org/10.17016/FEDS.2020.046r1.

Cameron, A. Colin, and Pravin K. Trivedi (2010). "Microeconometrics Using Stata Revised Edition" Stata Press, College Station, Texas

Masten, Matthew A., and Alexander Torgovitsky (2016). "Identification of Instrumental Variable Correlated Random Coefficients Models" The Review of Economics and Statistics 98 (5), pp. 1001-1005.

Masten, Matthew A., and Alexander Torgovitsky (2014). "Instrumental Variables Estimation of a Generalized Correlated Random Coefficients Model" Cemmap working paper CWP02/14