Learn R Programming

ivmte (version 1.0.1)

boundPValue: Construct p-values for treatment effects under partial identification

Description

This function estimates the p-value for the treatment effect under partial identification. p-values corresponding to forward and backward confidence intervals can be returned.

Usage

boundPValue(ci, bound, bound.resamples, n, m, levels, type, tol = 1e-08)

Arguments

ci

matrix or list. If type is set to 'forward' or 'backward', then ci should be a matrix of forward or backward confidence intervals corresponding to the levels declared in the option levels. If type is set to 'both', then ci should be a list of two elements. One element is a matrix of forward confidence intervals, and the other element is a matrix of backward confidence intervals.

bound

vector, bound of the treatment effects under partial identification.

bound.resamples

matrix, stacked bounds of the treatment effects under partial identification. Each row corresponds to a subset resampled from the original data set.

n

integer, size of original data set.

m

integer, size of resampled data sets.

levels

vector, real numbers between 0 and 1. Values correspond to the level of the confidence intervals constructed via bootstrap.

type

character. Set to 'forward' to construct the forward confidence interval for the treatment effect bound. Set to 'backward' to construct the backward confidence interval for the treatment effect bound. Set to 'both' to construct both types of confidence intervals.

tol

numeric, default set to 1e-08. The p-value is constructed by iteratively adjusting the confidence level to find a confidence interval that does not contain 0. When the adjustment of the confidence level falls below tol, no further iterations are performed.

Value

If type is 'forward' or 'backward', a scalar p-value corresponding to the type of confidence interval is returned. If type is 'both', a vector of p-values corresponding to the forward and backward confidence intervals is returned.