ivmodel-package: Statistical Inference and Sensitivity Analysis for...

Description Details Author(s) References Examples

Description

The package fits an instrumental variables (IV) model of the following type. Let Y, D, X, and Z represent the outcome, endogenous variable, p dimensional exogenous covariates, and L dimensional instruments, respectively; note that the intercept can be considered as a vector of ones and a part of the exogenous covariates X.The package assumes the following IV model

Y = X α + D β + ε, E(ε | X, Z) = 0

It carries out several IV regressions, diagnostics, and tests associated with the parameter β in the IV model. Also, if there is only one instrument, the package runs a sensitivity analysis discussed in Jiang et al. (2015).

The package is robust to most data formats, including factor and character data, and can handle very large IV models efficiently using a sparse QR decomposition.

Details

Supply the outcome Y, the endogenous variable D, and a data frame and/or matrix of instruments Z, and a data frame and/or matrix of exogenous covariates X (optional) and run ivmodel. Alternatively, one can supply a formula. ivmodel will generate all the relevant statistics for the parameter β.

The DESCRIPTION file: This package was not yet installed at build time.

Index: This package was not yet installed at build time.

Author(s)

Yang Jiang, Hyunseung Kang, Dylan Small, and Qingyuan Zhao

Maintainer: Hyunseung Kang <[email protected]>

References

Anderson, T. W. and Rubin, H. (1949). Estimation of the parameters of a single equation in a complete system of stochastic equations. Annals of Mathematical Statistics 20, 46-63.

Andrews, D. W. K., Moreira, M. J., and Stock, J. H. (2006). Optimal two-side invariant similar tests for instrumental variables regression. Econometrica 74, 715-752.

Card, D. Using Geographic Variation in College Proximity to Estimate the Return to Schooling. In Aspects of Labor Market Behavior: Essays in Honor of John Vanderkamp, eds. L.N. Christophides, E.K. Grant and R. Swidinsky. 201-222. National Longitudinal Survey of Young Men: https://www.nlsinfo.org/investigator/pages/login.jsp

Fuller, W. (1977). Some properties of a modification of the limited information estimator. Econometrica, 45, 939-953.

Moreira, M. J. (2003). A conditional likelihood ratio test for structural models. Econometrica 71, 1027-1048.

Wang, X., Jiang, Y., Small, D. and Zhang, N (2017), Sensitivity analysis and power for instrumental variable studies, (under review of Biometrics).

Sargan, J. D. (1958). The estimation of economic relationships using instrumental variables. Econometrica , 393-415.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(card.data)
# One instrument #
Y=card.data[,"lwage"]
D=card.data[,"educ"]
Z=card.data[,"nearc4"]
Xname=c("exper", "expersq", "black", "south", "smsa", "reg661", 
        "reg662", "reg663", "reg664", "reg665", "reg666", "reg667", 
		"reg668", "smsa66")
X=card.data[,Xname]
card.model1IV = ivmodel(Y=Y,D=D,Z=Z,X=X)
card.model1IV

# Multiple instruments
Z = card.data[,c("nearc4","nearc2")]
card.model2IV = ivmodel(Y=Y,D=D,Z=Z,X=X)
card.model2IV

Example output

Call:
ivmodel(Y = Y, D = D, Z = Z, X = X)
sample size: 3010
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

First Stage Regression Result:

F=13.25579, df1=1, df2=2994, p-value is 0.00027634
R-squared=0.004407934,   Adjusted R-squared=0.004075405
Residual standard error: 1.940537 on 2995 degrees of freedom
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

Coefficients of k-Class Estimators:

              k Estimate Std. Error t value Pr(>|t|)    
OLS    0.000000 0.074693   0.003498  21.351   <2e-16 ***
Fuller 0.999666 0.127501   0.052708   2.419   0.0156 *  
LIML   1.000000 0.131504   0.054964   2.393   0.0168 *  
TSLS   1.000000 0.131504   0.054964   2.393   0.0168 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

Alternative tests for the treatment effect under H_0: beta=0.

Anderson-Rubin test:
F=5.415279, df1=1, df2=2994, p-value=0.020028
95 percent confidence interval:
 [ 0.02480483596507 , 0.284823593339102 ]

Conditional Likelihood Ratio test:
Test Stat=5.415279, p-value=0.020028
95 percent confidence interval:
 [0.0248043722947519, 0.284824550721994]
Warning messages:
1: In qT * sin(x)^2 :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

2: In qT * sin(x)^2/m :
  Recycling array of length 1 in vector-array arithmetic is deprecated.
  Use c() or as.vector() instead.

3: In (qT + m)/(1 + qT * sin(x)^2/m) :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.


Call:
ivmodel(Y = Y, D = D, Z = Z, X = X)
sample size: 3010
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

First Stage Regression Result:

F=7.893096, df1=2, df2=2993, p-value is 0.00038114
R-squared=0.005246698,   Adjusted R-squared=0.004581978
Residual standard error: 1.940044 on 2995 degrees of freedom
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

Sargan Test Result:

Sargan Test Statistics=1.248153, df=1, p-value is 0.26391
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

Coefficients of k-Class Estimators:

              k Estimate Std. Error t value Pr(>|t|)    
OLS    0.000000 0.074693   0.003498  21.351  < 2e-16 ***
TSLS   1.000000 0.157059   0.052578   2.987  0.00284 ** 
Fuller 1.000075 0.158259   0.053079   2.982  0.00289 ** 
LIML   1.000409 0.164028   0.055495   2.956  0.00314 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

Alternative tests for the treatment effect under H_0: beta=0.

Anderson-Rubin test:
F=5.243935, df1=2, df2=2993, p-value=0.0053281
95 percent confidence interval:
 [ 0.05360026100892 , 0.361980791254619 ]

Conditional Likelihood Ratio test:
Test Stat=9.262454, p-value=0.003463
95 percent confidence interval:
 [0.0621199910210952, 0.336180869926706]

ivmodel documentation built on Nov. 17, 2017, 4:09 a.m.