partial_dependence_probit {SoftBart} | R Documentation |
Partial Dependence Function for SoftBART Probit Regression
Description
Computes the partial dependence function for a given covariate at a given set of covariate values for the probit model.
Usage
partial_dependence_probit(fit, test_data, var_str, grid)
Arguments
fit |
A fitted model of type |
test_data |
A data set used to form the baseline distribution of covariates for the partial dependence function. |
var_str |
A string giving the variable name of the predictor to compute the partial dependence function for. |
grid |
The values of the predictor to compute the partial dependence function at. |
Value
Returns a list with the following components:
-
pred_df
: a data frame containing columns for a MCMC iteration ID (sample
), the value on the grid, and the partial dependence function value. -
p
: a matrix containing the same information aspred_df
, with the rows corresponding to iterations and columns corresponding to grid values. -
grid
: the grid used as input.