Description Usage Arguments Value References Examples
Computes the optimal sensitivity and the optimal estimator when the set \mathcal{C} takes the form c=B*gamma with the lp norm of gamma bounded by M.
1 2 3 4 5 6 7 8 9 | OptEstimator(
eo,
B,
M,
p = 2,
spath = NULL,
alpha = 0.05,
opt.criterion = "FLCI"
)
|
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
|
spath |
Optionally, the solution path, output of |
alpha |
determines confidence level, |
opt.criterion |
Optimality criterion for choosing optimal bias-variance tradeoff. The options are:
|
Object of class "GMMEstimate"
, which is a list with at least
the following components:
Point estimate
Worst-case bias of estimator
Standard error of estimator
Half-length of confidence interval, so that the confidence interval takes the form h +- hl
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 10 11 12 13 | ## Replicates estimates in first line of Figure 1 in Armstrong and Kolesár
## (2020)
## 1. Compute matrix B when all instruments are invalid
I <- vector(mode="logical", length=nrow(blp$G))
I[c(6:13, 20:31)] <- TRUE
B <- blp$ZZ %*% diag(sqrt(blp$n)*abs(blp$perturb)/blp$sdZ)[, I, drop=FALSE]
## 2. Collect initial estimates
blp$k_init <- -drop(blp$H %*% solve(crossprod(blp$G, blp$W %*% blp$G),
crossprod(blp$G, blp$W)))
eo <- list(H=blp$H, G=blp$G, Sig=blp$Sig, n=blp$n, g_init=blp$g_init,
k_init=blp$k_init, h_init= blp$h_init)
OptEstimator(eo, B, M=sqrt(sum(I)), p=2, alpha=0.05, opt.criterion="Valid")
OptEstimator(eo, B, M=sqrt(sum(I)), p=2, alpha=0.05, opt.criterion="FLCI")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.