Learn R Programming

MIAmaxent (version 1.3.1)

plotResp: Plot model response.

Description

Plots the response of a given model over any of the explanatory variables (EVs) included in that model. For categorical variables, a bar plot is returned rather than a line plot. Single-effect response curves show the response of a model containing the explanatory variable of interest only, while marginal effect response curves show the response of the model when all other explanatory variables are held constant at their mean values (cf. plotResp, plotResp2).

Usage

plotResp(model, transformations, EV, logscale = FALSE, ...)

plotResp2(model, transformations, EV, logscale = FALSE, ...)

Arguments

model

The model for which the response is to be plotted. This may be the object returned by chooseModel, or the 'selectedmodel' returned by selectEV.

transformations

Transformation functions used to create the derived variables in the model. I.e. the 'transformations' returned by deriveVars. Equivalently, the full file pathway of the 'transformations.Rdata' file saved as a result of deriveVars.

EV

Character. Name of the explanatory variable for which the response curve is to be plotted. Interaction terms not allowed.

logscale

Logical. Plot the common logarithm of PRO rather than PRO itself.

...

Arguments to be passed to plot or barplot to control the appearance of the plot. For example:

  • lwd for line width

  • cex.main for size of plot title

  • space for space between bars

Functions

  • plotResp(): Plot single-effect model response.

  • plotResp2(): Plot marginal-effect model response.

Examples

Run this code
if (FALSE) {
# From vignette:
plotResp(grasslandmodel, grasslandDVs$transformations, "pr.bygall")
plotResp(grasslandmodel, grasslandDVs$transformations, "geolmja1")

plotResp2(grasslandmodel, grasslandDVs$transformations, "pr.bygall")
}

Run the code above in your browser using DataLab