View source: R/partial_dependence_probit.R
partial_dependence_probit | R Documentation |
Computes the partial dependence function for a given covariate at a given set of covariate values for the probit model.
partial_dependence_probit(fit, test_data, var_str, grid)
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. |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.