Description Usage Arguments Details Value References Examples
Computes J-test of overidentifying restrictions with critical value adjusted to allow for local misspecification, when the parameter c takes the form c=B*gamma with the lp norm of gamma bounded by M.
1 | Jtest(eo, B, M = 1, p = 2, alpha = 0.05)
|
eo |
List containing initial estimates with the following components:
|
B |
matrix B with full rank and dimension d_g by d_gamma that determines the set \mathcal{C}, where d_gamma is the number of invalid moments, and d_g is the number of moments |
M |
Bound on the norm of gamma |
p |
Parameter determining which lp norm to use, must equal
|
alpha |
determines confidence level, |
The test assumes initial estimator in eo
is optimal under correct
specification, computed using eo$Sig
as the weight matrix. The test is
based on a J statistic using critical values that account for local
misspecification; see appendix B in Armstrong and Kolesár (2020) for details.
List with three elements:
Value of J statistic
P-value of usual J test
P-value for J-test that allows for local misspecification
Minimum value of M for which the J-test does not reject
Armstrong, T. B., and M. Kolesár (2020): Sensitivity Analysis Using Approximate Moment Condition Models, https://arxiv.org/abs/1808.07387
1 2 3 4 5 6 7 8 9 | ## Replicates first line of Table 1 in Armstrong and Kolesár (2020)
## 1. Compute matrix B when instrument D/F # cars is invalid
I <- vector(mode="logical", length=nrow(blp$G))
I[6] <- TRUE
B <- (blp$ZZ %*% diag(sqrt(blp$n)*abs(blp$perturb)/blp$sdZ))[, I, drop=FALSE]
## 2. Make sure Sig corresponds to inverse of weight matrix
eo <- list(G=blp$G, Sig=solve(blp$W), n=blp$n, g_init=blp$g_init)
Jtest(eo, B, M=1, p=2, alpha=0.05)
Jtest(eo, B, M=1, p=Inf, alpha=0.05)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.