partial_dependence_probit: Partial Dependence Function for SoftBART Probit Regression

View source: R/partial_dependence_probit.R

partial_dependence_probitR 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 softbart_probit.

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 as pred_df, with the rows corresponding to iterations and columns corresponding to grid values.

  • grid: the grid used as input.


SoftBart documentation built on June 8, 2025, 9:40 p.m.