A variable selection approach which creates a null model by permuting the response, rebuilding the model, and calculating the inclusion proportion (IP) on the null model. The final result displayed is the original model's IP minus the null IP.

permVimp(model, data, response, numTreesPerm = NULL, plotType = "barplot")

Arguments

model

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

data

A data frame containing variables in the model.

response

The name of the response for the fit.

numTreesPerm

The number of trees to be used in the null model. As suggested by Chipman (2009), a small number of trees is recommended (~20) to force important variables to used in the model. If NULL, then the number of trees from the true model is used.

plotType

Either a bar plot ('barplot') or a point plot ('point')

Value

A variable selection plot.

Examples

if (FALSE) {
permVimp(model = my_model, data = my_data, response = my_response,
        numTreesPerm = 20, plotType = 'barplot')
}