*! version 1.0.0 07sep2014
help cmi_interval

Title

cmi_intterval -- Constructing the confidence interval proposed by Andrews and Shi(2013)

Syntax

cmi_interval
(lower bound vars)
(upper bound vars)
indepvars
[if] [in]
[,
level(real)
deci(#)
rnum(#)
hd
boot
ks
sfunc(#)
epsilon(real)
kap(real)
bn(real)
rep(#)
seed(#)
simul
]

Description

cmi_interval returns confidence intervals for an one-dimensional parameter bounded above and/or below by a finite number of conditional moments by inverting the testing procedure proposed in Andrews and Shi(2013).
Specifically, the procedure tests the null hypothesis: E[theta-lower bound vars|indepvars]>=0 and E[upper bound vars-theta|indepvars]>=0 for scalar thetas to construct the interval.
A candidate number is in the interval if the reported p-value is greater than the given significant level: (1-level).

cmi_interval uses countable hypercubes as the collection of instrumental functions.
When the dimension of indepvars is greater than 3, the number of cubes may be too large which cuases long computation time.
The command allows an alternative method for high dimensional independent variables. The user can select the hd option to opt for this method.
This option implements the method described in the last paragraph of Section 9 of Anrews and Shi(2013).

Options

level(real) sets the confidence level 1-alpha where alpha is the nominal significance level; the default is 0.95.

deci(#) sets the accuracy of the confidence interval bounds as measured by the number of digits after the decimal point.

rnum(#) sets a scalar indicating the minimum side-edge lengths; default is the smallest interger which is greater than r(N)^(DX/2)/2, where DX is the dimension of indepvars.

hd uses alternative method for high dimensional independent variables. This option is designed for three or more covariates; see the description for details.

boot lets the user turn on the bootstrap option. If this option is not used, the command computes the cirtical value based on a Gaussian asymptotic approximation.

ks uses the Kolmogorov-Smirnov type statistic; default is the Cramer-von Mises type statistic.

sfunc(#) sets the function S to specify the form of the test statistic. sfunc(1) yields the modified method of moments or Sum function and sfunc(3) yields the Max function; the default is sfunc(1).

epsilon(real) sets the regularization parameter epsilon for the sample variances; the default is epsilon(0.05).

kap(real) sets a tuning parameter in the data-dependent GMS function phi_n(g); see (4.9) of Andrews and Shi(2013) for details. the default is (0.3 * log(r(N)))^(1/2).

bn(real) sets a tuning parameter in the data-dependent GMS function phi_n(g); see (4.10) of Andrews and Shi(2013) for details. the default is (0.4 * log(r(N))/log(log(e(N))))^(1/2).

rep(#) sets the number of repetitions for the critical value simulation; the default is rep(5001).

seed(#) sets the seed number for the critical value simulations; the default is seed(10000).

simul lets the user choose to leave the seed number for the critical value simulations unset. This option should be turned on when the command is used inside a Monte Carlo simulation loop, so as not to interfere with the random number generation process set for the Monte Carlo simulation exercise.

Stored results

cmitest stores the following in r():

Scalars

r(N) number of observations

r(lbound) estimated lower bound

r(ubound) estimated upper bound

r(level) confidence level

r(ncube) number of cubes

r(kappa) tuning parameter kappa_n

r(B) tuning parameter B_n

r(epsilon) tuning parameter epsilon

r(rep_cv) repetitions for critical values

r(a_obs) average number of observations in the smallest cubes

r(r_n) index for minimum side-edge lengths

Macros

r(cmd) cmi_interval

r(title) "Conditional Moment Inequalities Interval"

r(lbvar) varlist for conditional moment inequalities for the lower bound, if any

r(ubvar) varlist for conditional moment inequalities for the upper bound, if any

r(x) varlist for regressors

Examples

Consider a missing data example.

Let Y be the logarithm of the potential wage after college enrollment. The variable Y is observed only for those who actually did enroll in a college (D=1). Suppose that the parameter of interest (theta_0) is the cumulative distribution function Y evaluated at log(20). Then, the parameter satisfies

E[1(Y<=log(20),D = 1) + 1(D = 0) - theta_0|X1,X2] >=0
E[theta_0 - 1(Y<= log(20), D = 1)|X1,X2] >=0

The command carries out inference on theta_0 using a cross-sectional sample of (Y,D) based on the these moment inequalities.

First, open the data set.

clear all

use cmitest.dta , clear

Then, construct the bounds.

gen lbound = ( Y < log(20) ) * D
gen ubound = ( Y < log(20) ) * D + 1 - D

Then, the command is used to return a confidence interval for the parameter of interest.

cmi_interval (lbound) (ubound) X1 X2

Use Max function and compute 90% confidence interval:

cmi_interval (lbound) (ubound) X1 X2, sfunc(3) level(0.9)

Use the lower bound alone and compute up to the second digit:

cmi_interval (lbound) ( ) X1 X2, deci(2)

References

Andrews, D., and X. Shi. 2013. Inference based on conditional moment inequalities.
Econometrica, Vol.81, No. 2, 609-666.