taxon.env
estimates taxon-environment relationships using
logistic regression.
taxon.env(form, bcnt, envdata, bcnt.siteid, bcnt.abndid,
env.siteid,tlevs = "all", dumpdata = FALSE)
Regression
formula for model.
Format is identical to that used for glm
.
A benthic count file with a full taxonomic hierarchy that
results from running get.taxonomic
.
Environmental data file
Field name for bcnt
unique site identifier.
Field name for bcnt
taxon abundance.
Field name for envdata
unique site
identifier.
Taxonomic levels to compute taxon-environment relationships.
Logical field specifying whether data used to estimate taxon-environment relationships should be included in the output.
Regression coefficient file that can be used with mlsolve
to
infer environmental conditions.
Taxon names for which models are calculated
Matrix of regression coefficients
Character vector with names of explanatory variables
Range of each explanatory variable
Model formula
Area under receiver operator curve for model for each taxon.
Data used to estimate relationships. Only included if
dumpdata = T
.
This script generates logistic regression models for taxa at various levels of
taxonomic resolution (as specified by the user). The script
computes the degrees of freedom specified by the model ($df$) and
selects taxa that occur in at least 10 times df and is absent from at
least 10 times df sites. Then, logistic regression models based on
the formula specified by the user are
computed for each taxon using glm
.
The user can select the taxonomic levels (e.g., CLASS, ORDER, SPECIES,
etc.) at which taxon-environment relationships are computed using the
parameter tlevs
. The default value for tlevs
computes
relationships at all levels.
# NOT RUN {
data(envdata.OR)
data(bcnt.tax.OR)
coef <- taxon.env(~sed + sed^2, bcnt.tax.OR, envdata.OR, "SVN",
"CountValue", "STRM.ID")
# }
Run the code above in your browser using DataLab