Learn R Programming

paleoMAS (version 2.0-1)

error.l: LOESS regression error estimation for multiple taxa

Description

This fucntion applies bootstrap crossvalidation (CV) of LOESS regressions of multiple taxa. The regression parameters for each taxon are previously selected.

Usage

error.l(x, y, z, trials = c(100, 0.25))

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.
z
A matrix containig the parameters for the LOESS regression of each taxon ($\alpha$ and degree in that order). Objects produced by bcrossv.all and akaike.all could be used as z.
trials
Values for number of repetitions of the crossvalidation (100 by default), and proportion of observations to be left out each time the CV is repeated. The observations left out each time are randomly selected with replacement.

Value

A matrix of 6 columns showing error diagnostics for each taxon LOESS regression (root of the predictive squared error (rse), and root of the mean squared error (rmse) see bcrossv.l1 for details). The proportion of the error relative to the data range and mean is presented in the last two columns.

Details

See bcrossv.l1 for details.

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

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 and bcrossv.l1

Examples

Run this code
data(modernq)
# Calculate percentages
perq<-percenta(modernq,first=2,last=39)[,2:55]
#if alpha and degree are selected using AIC
a.d<-akaike.all(modernq[,1],perq[,1:10])
error.l(modernq[,1],perq[,1:10],a.d)

Run the code above in your browser using DataLab