maxnet | R Documentation |
Maxent species distribution modeling using glmnet for model fitting
Using lp
for the linear predictor and entropy
for the entropy
of the exponential model over the background data, the values plotted on
the y-axis are:
lp
if type
is "link"
exp(lp)
if type
is "exponential"
1-exp(-exp(entropy+lp))
if type
is "cloglog"
1/(1+exp(-entropy-lp))
if type
is "logistic"
maxnet( p, data, f = maxnet.formula(p, data), regmult = 1, regfun = maxnet.default.regularization, addsamplestobackground = T, ... ) maxnet.default.regularization(p, m) maxnet.formula(p, data, classes = "default")
p |
numeric, a vector of 1 (for presence) or 0 (for background) |
data |
a matrix or data frame of predictor variables |
f |
formula, determines the features to be used |
regmult |
numeric, a constant to adjust regularization |
regfun |
function, computes regularization constant for each feature |
addsamplestobackground |
logical, if TRUE then add to the background any presence sample that is not already there |
... |
not used |
m |
a matrix of feature values |
classes |
charcater, continuous feature classes desired, either "default" or any subset of "lqpht" (for example, "lh") |
Maxnet returns an object of class maxnet
, which is a list
consisting of a glmnet model with the following elements added:
nonzero coefficients of the fitted model
constant offset making the exponential model sum to one over the background data
entropy of the exponential model
the regularization constants used for each feature
minimum of each feature, to be used for clamping
maximum of each feature, to be used for clamping
minimum of each predictor, to be used for clamping
maximum of each predictor, to be used for clamping
mean of each predictor over samples (majority for factors)
levels of each predictor that is a factor
Steve Phillips
## Not run: library(maxnet) data(bradypus) p <- bradypus$presence data <- bradypus[,-1] mod <- maxnet(p, data) plot(mod, type="cloglog") mod <- maxnet(p, data, maxnet.formula(p, data, classes="lq")) plot(mod, "tmp6190_ann") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.