This function calculates the response curve (functional responses) using a Bayesian Additive Regression Trees (BART) model.
response_curve_bart(bart_model, data, predictor_names)
A list containing a data frame for each independent variable with mean, 2.5th percentile, 97.5th percentile, and corresponding values of the variables.
A BART model object obtained from fitting BART ('dbarts::bart').
A data frame containing the predictor variables (the design matrix) used in the BART model.
A character vector containing the names of the predictor variables.