responsePlot: Response plots for maxnet-produced MaxEnt models

View source: R/responsePlots.R

responsePlotR Documentation

Response plots for maxnet-produced MaxEnt models

Description

Response plots are produced for some or all variables in the supplied maxnet model object.

Usage

responsePlot(
  thisModel,
  variable = "all",
  importance_threshold = NULL,
  responseType = c("link", "exponential", "cloglog", "logistic"),
  plot_ylimits = c(0, 1),
  ylabel = NULL,
  filename = NULL,
  occSWD = NULL,
  bkgSWD = NULL
)

Arguments

thisModel

A maxnet model object.

variable

Character. Names of one or more variables present in the model object. The default of 'all' causes all variables to included.

importance_threshold

Numeric. Percentage value to serve as a cut-off for variables to be included.

responseType

Character. Response type (scaling of model output) to be used.

plot_ylimits

Numeric vector. Limits to be used on the plot y-axis.

ylabel

Character. Label to be used on the y-axis replacing the default value formed from the prefix "Response" and the value of responseType.

filename

Character. Filename (with full path) into which graphics will be plotted.

occSWD

Data.frame. Environmental data at occurrence locations in SWD format; used to compute variable importance.

bkgSWD

Data.frame. Environmental data at background locations in SWD format; used to compute variable importance.

Details

This function is closely based on the source code for the corresponding function in the R package maxnet and draws inspiration from the response plots produced for Boosted Regression Tree (BRT) models produced by the package gbm.

Features of this function include:

  • Returns a list of ggplot objects allowing individual plots to be extracted and used for other purposes

  • Following the approach in package gbm, incorporation of variable importance scores supplied by the companion function varImportance

  • Ability to produce a plot for all variables in the maxnet model or a selection

Value

A named list of ggplot graphics objects ordered in decreasing variable importance, plus the side-effect of a pdf of plots.


peterbat1/fitMaxnet documentation built on Sept. 17, 2024, 10:50 p.m.