cal_rv {CopSens} | R Documentation |
Calculate Robustness Value When Executing Worstcase Calibration
Description
Calculate Robustness Value When Executing Worstcase Calibration
Usage
cal_rv(
y,
tr,
t1,
t2,
mu_y_dt = NULL,
sigma_y_t = NULL,
mu_u_dt = NULL,
cov_u_t = NULL,
nU = NULL,
...
)
Arguments
y |
|
tr |
|
t1 |
|
t2 |
|
mu_y_dt |
an optional scalar or vector that contains naive estimates of treatment effects ignoring confounding. |
sigma_y_t |
an optional scalar of the standard deviation of outcome conditional on treatments. |
mu_u_dt |
an optional matrix of difference in conditional confounder means, |
cov_u_t |
an optional covariance matrix of confounders conditional on treatments. |
nU |
Number of latent confounders to consider. |
... |
Value
A numeric vector
with elements being the robustness value or NA
if the ignorance region doesn't
contains 0 for each contrast of interest.
Examples
# load the example data #
y <- GaussianT_GaussianY$y
tr <- subset(GaussianT_GaussianY, select = -c(y))
# calculate robustness value #
cal_rv(y = y, tr = tr, t1 = tr[1:2,], t2 = tr[3:4,])