spartial: Spatial partial dependence plots

View source: R/spartials.R

spartialR Documentation

Spatial partial dependence plots

Description

Project partial dependence surfaces in the real, geography-having world: see the spatial signal of any given variable's contribution to the model predictions.

Usage

spartial(
  model,
  envs,
  x.vars = NULL,
  equal = FALSE,
  smooth = 1,
  transform = TRUE,
  save = TRUE
)

Arguments

model

A dbarts model object

envs

The rasterStack of environmental variables, OR (this is new functionality and mostly untested, but important if you're doing tSDMs) a list of rasterstacks (e.g., climate layers by year). If it's a list, this will return a rasterstack of spartials ordered by that list, then by variable (e.g., x1-stack1, x1-stack2, x2-stack1, x2-stack2)

x.vars

The particular x variables you want to map

equal

Equal spacing on x breaks (versus quantiles).

smooth

Smoothing factor for the x breaks (works like partials).

transform

Backtransform the pnorm or not

save

Turn this on if you want to save the outputs as a RasterStack, for nicer use/plotting elsewhere.

Value

Returns a nice plot


cjcarlson/embarcadero documentation built on Sept. 9, 2023, 10:47 p.m.