bcrossv.all: LOESS regression parameters selection through bootstrap...

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

Description

This function applies v-fold crossvalidation (CV) of loess regressions with varying α and degree for multiple taxa. The final result contains α and degree values that minimize the error of the loess regression for each taxon.

Usage

1
2
bcrossv.all(x, y, interval = c(0.15, 1, 0.05), 
           trials = c(10, 0.25), target = c("rse","rmse"))

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.

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 (25 percent of observations by default). The observations left out each time are randomly selected with replacement.

target

If target="rse" the values of alpha and degree that minimize the LOESS regression root of the predictive squared error are selected. If target="rmse" the values of α and degree that minimize the LOESS regression root mean squared error are selected.

Value

A matrix containing α and degree values that minimize the LOESS regression rse or rmse (depending on the choice in target.)

Author(s)

Alexander Correa-Metrio, Kenneth R. Cabrera.

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 for details on loess regression. bcrossv.l1 and bcrossv.l for details on the bootstrap cross-validation.

Examples

1
2
3
4
5
data(modernq)
# Calculate percentages
perq<-percenta(modernq,first=2,last=39)[,2:55]
bcrossv.all(modernq[,1],perq[,1:5],trials=c(10,0.1),target="rse")
bcrossv.all(modernq[,1],perq[,1:5],trials=c(10,0.1),target="rmse")

paleoMAS documentation built on May 2, 2019, 6:46 a.m.