boot.var: Performs bootstrap estimation procedures for the variance of...

View source: R/boot.var.R

boot.varR Documentation

Performs bootstrap estimation procedures for the variance of the proportion of treatment effect explained, the omnibus test, and identifying a region above a treshold.

Description

Performs bootstrap estimation procedures for the variance of the proportion of treatment effect explained, the omnibus test, and identifying a region above a treshold in a randomized treatment setting.

Usage

boot.var(data.control, data.treat, W.grid.expand, type, test = FALSE, 
data.all = NULL, num.cov = NULL, results.for.test = NULL, threshold = NULL)

Arguments

data.control

dataframe containing data from the control group, specifically the outcome Y, the surrogate S, and the baseline covariates W

data.treat

dataframe containing data from the treamtent group, specifically the outcome Y, the surrogate S, and the baseline covariates W

W.grid.expand

expanded version of the W grid of baseline covariates, where each row is a specific combination of the covariates for which the estimates should be provided

type

options are "model", "two step", or "both"; specifies the estimation method that should be used for the proportion of treatment effect explained

test

TRUE or FALSE, if test for heterogeneity is wanted

data.all

dataframe containing data from the control and treamtent groups, specifically the outcome Y, the surrogate S, and the baseline covariates W

num.cov

number of baseline covariates in the matrix W

results.for.test

the grid of estimates for the proportion of treatment effect explained obtained prior to bootstrapping, needed for the omnibus test

threshold

threshold to flag regions where the estimated proportion of the treatment effect explained is at least that high

Value

A list is returned:

return.grid

grid of variance estimates for the overall treatment effect, the residual treatment effect, and the proportion of treatment effect explained as a function of the baseline covariates, W. If requested by user, includes regions flagged above the threshold.

pval

p-value(s) from the F test and the two step omnibus test for heterogeneity, depending on type argument.


cohetsurr documentation built on April 11, 2025, 6:10 p.m.