response_curve_bart: Calculate Response Curve Using BART Model

View source: R/bart_functions.R

response_curve_bartR Documentation

Calculate Response Curve Using BART Model

Description

This function calculates the response curve (functional responses) using a Bayesian Additive Regression Trees (BART) model.

Usage

response_curve_bart(bart_model, data, predictor_names)

Arguments

bart_model

A BART model object obtained from fitting BART ('dbarts::bart').

data

A data frame containing the predictor variables (the design matrix) used in the BART model.

predictor_names

A character vector containing the names of the predictor variables.

Value

A list containing a data frame for each independent variable with mean, 2.5th percentile, 97.5th percentile, and corresponding values of the variables.


glossa documentation built on Oct. 15, 2024, 5:08 p.m.