Learn R Programming

paleoMAS (version 2.0-1)

akaike.l: Loess regression parameters selection through AIC minimization for one taxon

Description

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

Usage

akaike.l(x, y, interval = c(0.15, 1, 0.05), plot = TRUE, parameters = FALSE)

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
$\alpha$ values to be evaluated. Three numbers in the following order: lower and upper limits of the sequence of $\alpha$ values to be evaluated, and increment of the sequence.
plot
Logical indicating whether or not a figure displaying the behavior of AIC through $\alpha$ values conditioned to degree is plotted.
parameters
Logical indicating whether or not a matrix with the parameters of each LOESS regression is desired.

Value

A list with two components containing:
aic.loess
A matrix with the AIC values for each combination of $\alpha$ and degree.
minimum
The values of $\alpha$ and degree that minimize AIC.
minimum
A matrix containing all the parameters of the LOESS regression for each combination of $\alpha$ and degree (see Cleveland and Devlin (1988) and Hurvich & Simonoff (1998) for details). Only relevant if parameters=TRUE.

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 $\alpha$ values.

References

Correa-Metrio, A., M.B. Bush, L.Perez, A. Schwalb, and K. Cabrera. Accepted. Pollen distribution along climatic and biogeographic gradients in northern Central America. The Holocene

Hurvich, C.M., and J.S. Simonoff. 1998. Smoothing parameters selection in nonparametric regression using an improved Akaike information criterion. Journal of the Royal Society, Series B 60: 271-293.

Cleveland, W.S., and S.J. Devlin. 1988. Locally weighted regression: An approach to regression analysis by local fitting. Journal of the American Statistical Association 83: 596-610.

See Also

loess for details on LOESS regression.

Examples

Run this code
data(modernq)
# Calculate percentages
perq<-percenta(modernq,first=2,last=39)[,2:55]
akaike.l(modernq[,1],perq[,3])
akaike.l(modernq[,1],perq[,3],parameters=TRUE)

Run the code above in your browser using DataLab