bndovb: bndovb

Description Usage Arguments Value Author(s) References Examples

View source: R/bndovb.R

Description

This function runs a two sample least squares when auxiliary data contains every right-hand side regressor and main data contains a dependent variable and every right-hand side regressor but one omitted variable.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
bndovb(
  maindat,
  auxdat,
  depvar,
  ovar,
  comvar,
  method = 1,
  mainweights = NULL,
  auxweights = NULL,
  signres = NULL,
  ci = FALSE,
  nboot = 100,
  scale = -1/2,
  tau = 0.05,
  seed = 210823,
  display = TRUE
)

Arguments

maindat

Main data set. It must be a data frame.

auxdat

Auxiliary data set. It must be a data frame.

depvar

A name of a dependent variable in main dataset

ovar

A name of an omitted variable in main dataset which exists in auxiliary data

comvar

A vector of the names of common regressors existing in both main data and auxiliary data

method

CDF and Quantile function estimation method. Users can choose either 1 or 2. If the method is 1, the CDF and quantile function is estimated assuming a parametric normal distribution. If the method is 2, the CDF and quantile function is estimated using a nonparaemtric estimator in Li and Racine(2008) doi: 10.1198/073500107000000250, Li, Lin, and Racine(2013) doi: 10.1080/07350015.2012.738955. Default is 1.

mainweights

An optional weight vector for the main dataset. The length must be equal to the number of rows of 'maindat'.

auxweights

An optional weight vector for the auxiliary dataset. The length must be equal to the number of rows of 'auxdat'.

signres

An option to impose a sign restriction on a coefficient of an omitted variable. Set either NULL or pos or neg. Default is NULL. If NULL, there is no sign restriction. If 'pos', the estimator imposes an extra restriction that the coefficient of an omitted variable must be positive. If 'neg', the estimator imposes an extra restriction that the coefficient of an omitted variable must be negative.

ci

An option to compute an equal-tailed confidence interval. Default is FALSE. It may take some time to compute CI from bootstrap.

nboot

Number of bootstraps to compute the confidence interval. Default is 100.

scale

A tuning parameter for rescaled numerical bootstrap. The value must be between -1/2 and 0. (main data sample size)^scale is the tuning parameter epsilon_n in Hwang (2021). Default is -1/2 (that is, standard bootstrap).

tau

Significance level. (1-tau)% confidence interval is computed. Default is 0.05.

seed

Seed for random number generation. Default is 210823.

display

It must be either TRUE or FALSE. Whether to display progress and messages. Default is TRUE.

Value

Returns a list of 12 components :

hat_beta_l

lower bound estimates of regression coefficients

hat_beta_u

upper bound estimates of regression coefficients

mu_l

lower bound estimate of E[ovar*depvar]

mu_u

upper bound estimate of E[ovar*depvar]

hat_beta_l_cil

(1-tau)% confidence interval lower bound for hat_beta_l

hat_beta_l_ciu

(1-tau)% confidence interval upper bound for hat_beta_l

hat_beta_u_cil

(1-tau)% confidence interval lower bound for hat_beta_u

hat_beta_u_ciu

(1-tau)% confidence interval upper bound for hat_beta_u

mu_l_cil

(1-tau)% confidence interval lower bound for mu_l

mu_l_ciu

(1-tau)% confidence interval upper bound for mu_l

mu_u_cil

(1-tau)% confidence interval lower bound for mu_u

mu_u_ciu

(1-tau)% confidence interval upper bound for mu_u

Author(s)

Yujung Hwang, yujungghwang@gmail.com

References

Hwang, Yujung (2021)

Bounding Omitted Variable Bias Using Auxiliary Data. Available at SSRN.doi: 10.2139/ssrn.3866876

Examples

1
2
3
4
data(maindat_nome)
data(auxdat_nome)

bndovb(maindat=maindat_nome,auxdat=auxdat_nome,depvar="y",ovar="x1",comvar=c("x2","x3"),method=1)

yujunghwang/bndovb documentation built on Dec. 23, 2021, 8:20 p.m.