coefbounds: Coefficient bounds for linear models

Description Usage Arguments Details Value Author(s) References Examples

Description

Estimates the projections of the identification region along each coefficient dimension for a linear or logistic regression model with interval-censored outcomes (Beresteanu and Molinari 2008, Corollary 4.5). If requested, uses a nonparametric bootstrap to estimate critical values for hypothesis tests about these projections (Beresteanu and Molinari 2008, Algorithm 4.2).

Usage

1
2
3
coefbounds(formula, data, subset, na.action, model = c("linear", "logit"),
  boot = 100, cluster_id = NULL, maxit = 10, remove_collinear = TRUE,
  return_boot_est = FALSE)

Arguments

formula

Model formula of the form yl + yu ~ x1 + x2 + ..., where yl is the lower bound on the response, yu is the upper bound, and x1 + x2 + ... are the covariates. For instrumental variables estimation, use a formula like yl + yu ~ x1 + x2 + ... | z1 + z2 + ..., as in ivreg in the AER package. IV estimates not available for logit models.

data, subset, na.action

As in lm

model

"linear" for linear regression (default), "logit" for logistic regression.

boot

Number of bootstrap iterations used to estimate the critical values for inference.

cluster_id

Vector of cluster IDs for cluster bootstrap. If NULL (the default), an ordinary bootstrap is used.

maxit

Maximum number of iterations for the approximation in logistic regression models. Ignored when model = "linear".

remove_collinear

How to treat boostrap iterations in which the design matrix is rank-deficient. If TRUE (the default), a warning is issued and the bad iterations are removed. If FALSE, the function fails with an error when a rank-deficient design matrix is encountered.

return_boot_est

Whether to include the bootstrap estimates of the coefficient bounds in the returned object.

Details

In the linear case, implements largely the same functionality as oneDproj and CI1D in Beresteanu et al.'s (2010) Stata program.

Value

A list of class "coefbounds" containing:

coefficients

Matrix containing the sample estimates of the coefficient bounds.

dist

List of matrices containing the bootstrap Hausdorff distances (undirected and directed) used for inference.

boot_est

(if requested) List of matrices of bootstrap estimates of the coefficient bounds.

nobs

Number of observations used in fitting.

call

Original function call.

model

Model used.

Author(s)

Brenton Kenkel

References

Arie Beresteanu and Francesca Molinari. 2008. "Asymptotic Properties for a Class of Partially Identified Models." Econometrica 76 (4): 763–814.

Arie Beresteanu, Francesca Molinari and Darcy Steeg Morris. 2010. "Asymptotics for Partially Identified Models in Stata." https://molinari.economics.cornell.edu/programs.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Simulate data
set.seed(18)
x1 <- rnorm(50)
x2 <- rnorm(50)
y <- 1 - x1 + x2 + rnorm(50)
yl <- floor(y)
yu <- ceiling(y)

## Fit model without covariates
fit_mean <- coefbounds(yl + yu ~ 1, boot = 0)
all.equal(coef(fit_mean)[1, "lower"], mean(yl))
all.equal(coef(fit_mean)[1, "upper"], mean(yu))

## Fit model with covariates
fit_full <- coefbounds(yl + yu ~ x1 + x2, boot = 10)
coef(fit_full)

brentonk/coefbounds documentation built on May 13, 2019, 5:09 a.m.