plot_partial_dependence_v2: Partial Dependence Plots

View source: R/plot_partial_dependence_v2.R

plot_partial_dependence_v2R Documentation

Partial Dependence Plots

Description

Plot the partial dependence of the response for each covariate

Usage

plot_partial_dependence_v2(
  rf_mod,
  data,
  plot_covars = NULL,
  data_dict = NULL,
  type = c("quantile", "mean"),
  pred_quantile = 0.9,
  n_pts = 200,
  log_transform = T,
  log_offset = 0.005,
  scales = "free"
)

Arguments

rf_mod

the quantregForest model

data

the data.frame used to fit the rf_mod

plot_covars

character vector of covariates to plot

data_dict

data.frame containing columns

type

whether to predict a particular quantile, or the mean

pred_quantile

if type is "quantile", which quantile to predict, between 0 and 1? The default value is 0.9

n_pts

how many points to use in predictions?

log_transform

was the response log transformed?

log_offset

if an offset was used before log transforming, enter it here.

scales

ggplot facet_wrap argument scales for facetting

...

other arguements to be passed to ggplot

Value

ggplot object

Author(s)

Kevin See


KevinSee/QRFcapacity documentation built on Feb. 27, 2023, 3:57 p.m.