Description Usage Arguments Details Value References
Evaluates models for n_boot
bootstrap iterations to obtain confidence bands for the estimated PDP.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
formula |
(required) an output formula for the outcome. |
variable |
(required) the treatment variable. |
data |
(required) a data frame to be used for the training. |
newdata |
an optional data frame of test data for the PDPs (default is |
grid |
sets the values of |
n_boot |
the number of bootstrap replications (default is 100). |
p_boot |
the proportion of the data to select for each bootstrap replication (default is 0.6). |
N |
the number of observations to select for calculating the PDPs (default is 1000). |
method |
the model method (default is |
label |
a character-string variable label for |
clock |
a logical indicating whether to time each bootstrap replication (default is |
test |
a logical indicating whether to calculate the pdp for both the |
seed |
a random seed (default is 8675309). |
... |
additional arguments specific to the method some additional arguments may be required for some methods, e.g. |
plot |
a logical indicating whether to plot the resulting |
bsPDP
currently supports the following methods:
lm
for linear models
glm
for generalized linear models
randomForest
for random forests
caret
for pramater tuning with machine-learning models (including tree ensembles and neural networks)
dbarts
and BayesTree
for Bayesian Additive Regression Trees (BART)
causaldrf
for inverse probability-of-treatment weights estimators and the Hirano-Imbens (2004) covariate balancing estimators.
bsPDP
returns an object with class "bsPDP," a list that includes the following components:
variable |
the treatment variable. |
pdpData |
the estimated average predictions and standard errors along |
trainData |
the original training data. |
testData |
the test data. |
outcome |
the outcome class ( |
method |
the method |
Yakusheva, Olga; Bang, James T; Bobay, Kathleen; Hughes, Ronda G; Costa, Linda; and Weiss, Marianne (2021, Forthcoming). Health Services Research.
Breiman, Leo, 2001. Random forests. Machine learning. 45(1), pp.5-32.
Chipman, H.; George, E.; and McCulloch, R. (2010) BART: Bayesian Additive Regression Trees. Annals of Statistics. 4(1), pp. 266-298.
Hirano, Keisuke, Imbens, Guido W (2004). The propensity score with continuous treatments. Applied Bayesian modeling and causal inference from incomplete-data perspectives. 226164, pp. 73-84.
Schafer, J.L., Galagate, D.L. (2015). Causal inference with a continuous treatment and outcome: alternative estimators for parametric dose-response models. Doctoral dissertation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.