# maxnet

From maxnet v0.1.2
by Steven Phillips

##### Maxent over glmnet

Maxent species distribution modeling using glmnet for model fitting

##### Usage

```
maxnet(p, data, f = maxnet.formula(p, data), regmult = 1,
regfun = maxnet.default.regularization, ...)
maxnet.default.regularization(p, m)
```# S3 method for maxnet
predict(object, newdata, clamp=T, type=c("link","exponential","cloglog","logistic"), ...)
# S3 method for formula
maxnet(p, data, classes="default")

##### Arguments

- p
- a vector of 1 (for presence) or 0 (for background).
- data
- a matrix or data frame of predictor variables.
- f
- a formula to determine the features to be used.
- regmult
- a constant to adjust regularization.
- regfun
- a function to compute regularization constant for each feature.
- object
- an object of class
`"maxnet"`

, i.e., a fitted model. - newdata
- values of predictor variables to predict to.
- m
- a matrix of feature values.
- clamp
- if true, predictors and features are restricted to the range seen during model training.
- type
- type of response required.
- classes
- continuous feature classes desired, either "default" or any subset of "lqpht" (for example, "lh").
- …
- not used.

##### Details

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".

##### Value

Maxnet returns an object of class `maxnet`

, which is a list consisting of a glmnet model with the following elements added:

##### Examples

```
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")
```

*Documentation reproduced from package maxnet, version 0.1.2, License: MIT + file LICENSE*

### Community examples

Looks like there are no examples yet.