CI_block_boot: Construct the 95% confidence interval of the treatment effect...

Description Usage Arguments Details Examples

View source: R/CI_block_boot.R

Description

This is the main function in the package. Given a dataset and sensitivity parameters (p, lambda, delta), the function returns 95% CI for the estimated treatment effect.

Usage

1
CI_block_boot(q, u, p, lambda, delta, data_matched, n_boot = 2000)

Arguments

q

Number of matched covariates plus treatment.

u

Unmeasured confounder; u = c(1,0) if the unmeasured confounder is assumed to be binary.

p

The probability vector corresponding to u; p = c(0.5, 0.5) if the unmeasured confounder is assumed to be Bernoulli(0.5).

lambda

Sensitivity parameter that controls association between U and treatment assignment.

delta

Sensitivity parameter that controls association between U and response.

data_matched

The dataset after matching.

n_boot

Number of boostrap samples.

Details

If the number of matched covariates is k, then q = k + 1.

If the hypothesized unmeasured confounder is binary, then u = c(1,0) and p = c(p, 1-p).

data_matched should be in the following format: the first (q-1) columns are matched covariates, the qth column is the treatment status, and the (q+1)th column is the response. See the NHANES_blood_lead_small_matched dataset for an example.

Note the input for this function is a dataset before matching. To run this function, optmatch package needs to be installed and loaded.

Examples

1
2
3
4
5
6

sensitivityCalibration documentation built on May 2, 2019, 1:07 p.m.