Learn R Programming

MIAmaxent (version 1.3.1)

chooseModel: Trains a model containing the explanatory variables specified.

Description

chooseModel trains a model based on the formula provided. The formula specifies which explanatory variables (EVs) --- and potentially first-order interactions between these --- should be included in the model. Each EV can be represented by 1 or more derived variables (see deriveVars). The function may be employed to choose a model from the selection pathway of selectEV other than the model selected under the provided alpha value.

Usage

chooseModel(dvdata, formula, algorithm = "maxent")

Arguments

dvdata

A list containing first the response variable, followed by data frames of selected derived variables for a given explanatory variable (e.g. the first item in the list returned by selectDVforEV).

formula

A model formula (in the form y ~ x + ...) specifying the independent terms (EVs) to be included in the model. The item in dvdata is still taken as the response variable, regardless of formula.

algorithm

Character string matching either "maxent" or "LR", which determines the type of model built. Default is "maxent".

Details

Explanatory variables should be uniquely named. Underscores ('_') and colons (':') are reserved to denote derived variables and interaction terms respectively, and chooseModel will replace these --- along with other special characters --- with periods ('.').

Examples

Run this code
if (FALSE) {
# From vignette:
grasslandmodel <- chooseModel(grasslandDVselect$dvdata,
                              formula("~ pr.bygall + geoberg + lcucor1 +
                                      tertpi09 + geolmja1"))
}

Run the code above in your browser using DataLab