obs.boot.var | R Documentation |
Calculates bootstrapped variance estimates of delta, delta.s, and R.s, and optionally calculates p-values for identifying individuals for whom the surrogate is strong.
obs.boot.var(df.train, df.test, type, numeric_predictors, categorical_predictors,
threshold, use.actual.control.S, gam.smoothers, tree.tuners)
df.train |
A dataframe containing training data. |
df.test |
A dataframe containing testing data. |
type |
Options are "linear", "gam", "trees", or "all"; type of base learners to use. |
numeric_predictors |
The column names in the dataframes that represent numeric baseline covariates. |
categorical_predictors |
The column names in the dataframes that represent categorical baseline covariates. |
threshold |
An optional threshold to test individuals for the null hypothesis that PTE is greater than the threshold. |
use.actual.control.S |
TRUE or FALSE, if user prefers to use the actual observed values for the surrogate in the control group instead of predicting values from the base learners. |
gam.smoothers |
A list of smoothing parameters to use for GAM base learners, so they are not retuned with bootstrapping iterations ("m1sp", "m0sp", "m1ssp", "m0ssp", "s0") |
tree.tuners |
A list of tuning parameters to use for tree base learners, so they are not retuned with bootstrapping iterations ("m1sp", "m0sp", "m1ssp", "m0ssp", "s0") |
A dataframe is returned, which is the df.test argument with new columns appended for the estimated variances of delta, delta.s, and R.s, as well as p-values if a threshold is provided.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.