This function calculates the Akaike Information Criteron (AIC) of LOESS regressions with varying α and degree for a single taxon.

Usage

1
2

Arguments

x

A vector containing the environmental gradient value for each sample or location.

y

A matrix containing the observed taxa abundances along the environmental gradient. Taxa are in columns and samples in rows.

interval

α values to be evaluated. Three numbers in the following order: lower and upper limits of the sequence of α values to be evaluated, and increment of the sequence.

plot

Logical indicating whether or not a figure displaying the behavior of AIC through α values conditioned to degree is plotted.

parameters

Logical indicating whether or not a matrix with the parameters of each LOESS regression is desired.

Details

AIC is calculated according to Hurvich & Simonoff (1998) for LOESS regressions (Cleveland and Devlin, 1988) generated through all possible combinations between degree (1 and 2) and the generated series of α values.

Value

A list with two components containing:

aic.loess

A matrix with the AIC values for each combination of α and degree.

minimum

The values of α and degree that minimize AIC.

minimum

A matrix containing all the parameters of the LOESS regression for each combination of α and degree (see Cleveland and Devlin (1988) and Hurvich & Simonoff (1998) for details). Only relevant if parameters=TRUE.