partialResponse | R Documentation |
Get partial response data.
partialResponse(model, data, var=NULL, rng=NULL, nsteps=25, plot=TRUE, nr, nc, ...)
partialResponse2(model, data, var1, var2, var2levels, rng=NULL, nsteps=25, ...)
model |
a model object |
data |
data.frame with data for all model variables |
var |
character or positive integer to identify the variable(s) of interest in |
var1 |
character or positive integer to identify the variable of interest in |
var2 |
character. A second variable of interest |
var2levels |
character. The levels of the second variable to consider |
rng |
optional vector of two numbers to set the range or the variable |
nsteps |
positive integer. Number of steps to consider for the variable |
plot |
logical. If |
nc |
positive integer. Optional. The number of columns to divide the plotting device in (when plotting multiple variables) |
nr |
positive integer. Optional. The number of rows to divide the plotting device in (when plotting multiple variables) |
... |
model specific additional arguments passed to |
list (invisible if plot=TRUE
)
fsp <- system.file("/ex/bradypus.csv", package="predicts")
occ <- read.csv(fsp)[,-1]
f <- system.file("ex/bio.tif", package="predicts")
preds <- rast(f)[[c(1,7,9)]]
v <- extract(preds, occ, ID=FALSE)
bc <- envelope(v)
pr <- partialResponse(bc, data=v, var=c("bio1", "bio12"), nsteps=30)
str(pr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.