ivdoctr1.0.1 package

Ensures Mutually Consistent Beliefs When Using IVs

b_functionA3

B function from Proposition A3

candidate1

Evaluates the corners given user bounds. Vectorized wrt multiple draws...

candidate2

Evaluates the edge where k is on the boundary. Vectorized wrt multiple...

candidate3

Evaluates the edge where r_TstarU is on the boundary.

collapse_3d_array

Collapse 3-d array to matrix

draw_bounds

Computes bounds for simulated data

draw_observables

Simulates different data draws

draw_sigma_jeffreys

Draws covariance matrix using the Jeffrey's Prior

format_est

Creates LaTeX code for parameter estimates

format_HPDI

Creates LaTeX code for the HPDI

format_se

Creates LaTeX code for the standard error

g_functionA2

G function from Proposition A.2

get_alpha_bounds

Computes a0 and a1 bounds

get_beta

Solves for beta

get_beta_bounds_binary

Returns beta bounds in binary case using grid search

get_beta_bounds_binary_post

Generates beta bounds off of beta draws

get_bounds_unrest

Wrapper function combines all unrestricted bounds together. Vectorized

get_estimates

Computes OLS and IV estimates

get_k_bounds_unrest

Given observables from the data, generates unrestricted bounds for kap...

get_L

Computes L, lower bound for kappa_tilde in paper

get_M

Solves for the magnification factor

get_new_draws

Computes beliefs that support valid instrument

get_observables

Given data and function specification, returns the relevant correlatio...

get_p_valid

Compute the share of draws that could contain a valid instrument.

get_psi_lower

Computes the lower bound of psi for binary data

get_psi_upper

Computes the upper bound of psi for binary data

get_r_TstarU_bounds_unrest

Given observables from the data, generates the unrestricted bounds for...

get_r_uz

Solves for r_uz given observables, r_TstarU, and kappa

get_r_uz_bounds

Evaluates r_uz bounds given user restrictions on r_TstarU and kappa

get_r_uz_bounds_unrest

Given observables from the data, generates the unrestricted bounds for...

get_s_u

Solves for the variance of the error term u

getCoverage

Computes coverage of list of intervals

getInterval

Generates smallest covering interval

ivdoctr

Generates parameter estimates given user restrictions and data

make_full_row

Takes the OLS and IV estimates and converts it to a row of the LaTeX t...

make_tex_row

Makes LaTeX code to make a row of a table and shift by some amount of ...

makeTable

Generates table of parameter estimates given user restrictions and dat...

map2color

Generates a custom color palette given a vector of numbers

myformat

Rounds x to two decimal places

plot_3d_beta

Plot ivdoctr Restrictions

rect_points

Construct vectors of points that outline a rectangle.

rinvwish

Simulate draws from the inverse Wishart distribution

toList

Convert 3-d array to list of matrixes

Uses data and researcher's beliefs on measurement error and instrumental variable (IV) endogeneity to generate the space of consistent beliefs across measurement error, instrument endogeneity, and instrumental relevance for IV regressions. Package based on DiTraglia and Garcia-Jimeno (2020) <doi:10.1080/07350015.2020.1753528>.

  • Maintainer: Mallick Hossain
  • License: CC0
  • Last published: 2021-12-05