taxon.env: Estimate taxon-environment relationships

Description Usage Arguments Details Value Author(s) See Also Examples

Description

taxon.env estimates taxon-environment relationships using logistic regression.

Usage

1
2
taxon.env(form, bcnt, envdata, bcnt.siteid, bcnt.abndid,
env.siteid,tlevs = "all", dumpdata = FALSE)

Arguments

form

Regression formula for model. Format is identical to that used for glm.

bcnt

A benthic count file with a full taxonomic hierarchy that results from running get.taxonomic.

envdata

Environmental data file

bcnt.siteid

Field name for bcnt unique site identifier.

bcnt.abndid

Field name for bcnt taxon abundance.

env.siteid

Field name for envdata unique site identifier.

tlevs

Taxonomic levels to compute taxon-environment relationships.

dumpdata

Logical field specifying whether data used to estimate taxon-environment relationships should be included in the output.

Details

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.

Value

Regression coefficient file that can be used with mlsolve to infer environmental conditions.

tnames

Taxon names for which models are calculated

csave

Matrix of regression coefficients

xvar

Character vector with names of explanatory variables

xlims

Range of each explanatory variable

form

Model formula

roc

Area under receiver operator curve for model for each taxon.

raw.data

Data used to estimate relationships. Only included if dumpdata = T.

Author(s)

Lester L. Yuan

See Also

get.taxonomic

Examples

1
2
3
4
data(envdata.OR)
data(bcnt.tax.OR)
coef <- taxon.env(~sed + sed^2, bcnt.tax.OR, envdata.OR, "SVN",
"CountValue", "STRM.ID")

Example output

Loading required package: tcltk
Warning message:
no DISPLAY variable so Tk is not available 
Model formula:  resp ~sed+I(sed^2) 
Minimum number of occurrences:  30 
Number of taxa modeled:
   TAXON.LEVEL NUM.MODS
1       PHYLUM        4
2    SUBPHYLUM        2
3        CLASS        5
4     SUBCLASS        3
5   INFRACLASS        0
6   SUPERORDER        0
7        ORDER        3
8     SUBORDER        3
9   INFRAORDER        6
10 SUPERFAMILY        4
11      FAMILY       26
12   SUBFAMILY       23
13       TRIBE       11
14       GENUS       50
15     SPECIES       26

bio.infer documentation built on Sept. 2, 2020, 5:08 p.m.