`extractTreeData.Rd`

Creates a list of all tree attributes for a model created by either the BART, dbarts or bartMachine packages.

`extractTreeData(model, data)`

model | Model created from either the BART, dbarts or bartMachine packages. |
---|---|

data | a data frame used to build the BART model. |

A list containing the extracted and processed tree data. This list includes:

**Tree Data Frame**: A data frame containing tree attributes.**Variable Name**: The names of the variables used in building the model.**nMCMC**: The total number of iterations (posterior draws) after burn-in.**nTree**: The total number of trees grown in the sum-of-trees model.**nVar**: The total number of covariates used in the model.

The object created by the `extractTreeData` function encompasses these elements, facilitating detailed analysis and visualisation of BART model components.

if (FALSE) { df_trees <- extractTreeData(model = my_model, data = my_data) }