obs.estimate.PTE: Estimate the proportion of the treatment effect explained in...

obs.estimate.PTER Documentation

Estimate the proportion of the treatment effect explained in an observational setting.

Description

Fits base learners using the specified type of model on the training data, and uses those models to calculate delta, delta.s, and R.s on the testing set.

Usage

obs.estimate.PTE(df.train, df.test, type, numeric_predictors, categorical_predictors, 
  use.actual.control.S, gam.smoothers, tree.tuners, want.smooth, want.tune)

Arguments

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.

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")

want.smooth

TRUE or FALSE, if smoothing parameters for GAM should be saved

want.tune

TRUE or FALSE, if tuning parameters for trees should be saved

Value

A list is returned:

df.test

df.test argument with new columns appended for the estimates of delta, delta.s, and R.s

smooth_params

A list of smoothing parameters used for GAM base learners ("m1sp", "m0sp", "m1ssp", "m0ssp", "s0")

tuner_params

A list of tuning parameters used for tree base learners ("m1sp", "m0sp", "m1ssp", "m0ssp", "s0")


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