This Matlab program getbounds.m calculates the confidence interval for beta_1 in a sample selection model without exclusion restrictions using the method and assumptions in Honoré and Hu (2020).

The syntax is

[f,f_sub,cv,CI]=getbounds(d,y,x,b,bn,nrep,pct)

Inputs:

d:     dummy variable for selection (n-by-1)
y:     the outcome (n-by-1; missing values should be NaN)
x:     matrix of explanatory variables (n-by-k)
b:     grid over which the objective function is calculated
bn:    sub-sample size
nrep:  number of subsamples
pct:   the pct% confidence interval is calculated (eg pct could be 95)

Outputs:

f:     the objective function calculates at each element of b
f_sub: the objective function calculates at each element of b in each sub-sample
cv:	   the critical value function
CI:    the end points of the confidence interval

Example_Program.m illustrated the use of the program. Note that this program used real data and takes a long time to run (around 1.5 hours on an Apple MacBook Pro).

Reference: Honoré, Bo E., and Luojia Hu. 2020. “Selection Without Exclusion.” Econometrica 88 (3): 1007-1029.
