projectModel | R Documentation |
projectModel
calculates model predictions for any points where values
of the explanatory variables in the model are known. It can be used to get
model predictions for the training data, or to project the model to a new
space or time.
projectModel(
model,
transformations,
data,
clamping = FALSE,
raw = FALSE,
rescale = FALSE,
filename = NULL
)
model |
The model to be projected, represented by an object of class
'glm'. This may be the object returned by |
transformations |
Transformation functions used to create the derived
variables in the model. I.e. the 'transformations' returned by
|
data |
Data frame of all the explanatory variables (EVs) included in the
model (see |
clamping |
Logical. Do clamping sensu Phillips et al. (2006).
Default is |
raw |
Logical. Return raw maxent output instead of probability ratio output (PRO)? Default is FALSE. Irrelevant for 'lr' class models. |
rescale |
Logical. Linearly rescale model output (PRO or raw) with
respect to the projection |
filename |
Full file pathway to write raster model predictions if
|
Missing data (NA) for a continuous variable will result in NA output for that point. Missing data for a categorical variable is treated as belonging to none of the categories.
When rescale = FALSE
the scale of the maxent model output (PRO or raw)
returned by this function is dependent on the data used to train the model.
For example, a location with PRO = 2 can be interpreted as having a
probability of presence twice as high as an average site in the
training data (Halvorsen, 2013, Halvorsen et al., 2015). When
rescale = TRUE
, the output is linearly rescaled with respect to the
data onto which the model is projected. In this case, a location with PRO = 2
can be interpreted as having a probability of presence twice as high as an
average site in the projection data. Similarly, raw values are on a
scale which is dependent on the size of either the training data extent
(rescale = FALSE
) or projection data extent (rescale = TRUE
).
List of 2:
output: A data frame with the model
output in column 1 and the corresponding explanatory data in subsequent
columns, or a raster containing predictions if data
is a RasterStack
or RasterBrick.
ranges: A list showing the range of data
compared to the training data, on a 0-1 scale.
If data
is a
RasterStack or RasterBrick, the output is also plotted.
Halvorsen, R. (2013) A strict maximum likelihood explanation of MaxEnt, and some implications for distribution modelling. Sommerfeltia, 36, 1-132.
Halvorsen, R., Mazzoni, S., Bryn, A. & Bakkestuen, V. (2015) Opportunities for improved distribution modelling practice via a strict maximum likelihood interpretation of MaxEnt. Ecography, 38, 172-183.
Phillips, S.J., Anderson, R.P. & Schapire, R.E. (2006) Maximum entropy modeling of species geographic distributions. Ecological Modelling, 190, 231-259.
## Not run:
# From vignette:
EVstack <- raster::stack(c(
list.files(system.file("extdata", "EV_continuous", package="MIAmaxent"),
full.names=TRUE),
list.files(system.file("extdata", "EV_categorical", package="MIAmaxent"),
full.names=TRUE)))
grasslandPreds <- projectModel(model = grasslandmodel,
transformations = grasslandDVs$transformations,
data = EVstack)
grasslandPreds
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.