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.
boundPValue(ci, bound, bound.resamples, n, m, levels, type, tol = 1e-08)
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.
vector, bound of the treatment effects under partial identification.
matrix, stacked bounds of the treatment effects under partial identification. Each row corresponds to a subset resampled from the original data set.
integer, size of original data set.
integer, size of resampled data sets.
vector, real numbers between 0 and 1. Values correspond to the level of the confidence intervals constructed via bootstrap.
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.
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.
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.