Learn R Programming

S4DM (version 0.0.1)

get_response_curves: Generate Response Curves

Description

Given an environmental data set, fitted models, and a directory to output plots, this function generates response curves for each predictor in the model. The response curves depict the predicted change in probability of presence as a function of the environmental predictor while holding all other predictors constant at their mean values.

Usage

get_response_curves(
  env_bg,
  env_pres,
  pnp_model,
  n.int = 1000,
  envMeans = NULL,
  envSDs = NULL
)

Value

This function generates a set of marginal predictions for each environmental variable, holding other variables constant

Arguments

env_bg

Object returned by get_env_bg

env_pres

Object returned by get_env_pres

pnp_model

Object returned by fit_plug_and_play or fit_density_ratio

n.int

Number of points along which to calculate the response curve

envMeans

A vector of means for each environmental predictor in the dataset. (not used)

envSDs

A vector of standard deviations for each environmental predictor in the dataset.(not used)

Author

Cory Merow, modified by Brian Maitner