Description Usage Arguments Details Value Author(s) References See Also Examples
This function performs vfold crossvalidation (CV) of a LOESS regression of known α and degree for a single taxon.
1 2  bcrossv.l1(x, y, trials = c(100, 0.25), span = 0.75, degree = 2,
plot = TRUE, estimated = FALSE)

x 
A vector containing the environmental gradient value for each sample or location. 
y 
A vector containing the observed taxa abundances along the environmental gradient. 
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 (0.25 by default). The observations left out each time are randomly selected with replacement. 
span 
α value for the LOESS regression. 
degree 
Degree of the LOESS regression. Limited to 1 and 2. 
plot 
Logical indicating whether or not an observed vs. error plot is desired 
estimated 
Logical indicating whether or not the matrix with the estimated values is desired. 
The LOESS regression (Cleveland and Devlin, 1988) CV is repeated as many times as indicated in the first component of trials
. Each repetition leaves out a fraction of the total number of observations (indicated in the second component of trials
). α and degree values for the LOESS regression are fixed and indicated in span
and degree
respectively. Returns the results of the crossvalidation and an error matrix containing the predictive squared error (se, 1/n*sum(estobs)^2), the root predictive squared error (rse, pse^0.5), and root mean squared error (rmse, 1/n*sum(abs(obsest))).
If the remaining number of observations after leaving out a certain number of elements is too low, the fitting of the LOESS regression is not possible. Therefore, it is recommended to keep the second component of trials
low, unless the number of observations is large enough.
A matrix error
containing the predictive squared error (se), the root predictive squared error (rse), and the root mean squared error (rmse). If estimated=TRUE
, returns an additional matrix of three columns containing the values of the environmental parameter ("x"
), and observed ("observed"
) and predicted ("predicted"
) percentages.
Alexander CorreaMetrio, Kenneth R. Cabrera.
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: 596610.
loess
for details on LOESS regression.
1 2 3 4 5 
Loading required package: MASS
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.44
value
se 1.3996601
rse 1.1830723
rmse 0.7654366
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.