bcrossv.l1(x, y, trials = c(100, 0.25), span = 0.75, degree = 2, plot = TRUE, estimated = FALSE)
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.
trials
. Each repetition leaves out a fraction of the total number of observations (indicated in the second component of trials
). $\alpha$ 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(est-obs)^2), the root predictive squared error (rse, pse^0.5), and root mean squared error (rmse, 1/n*sum(abs(obs-est))).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.
loess
for details on LOESS regression.
data(modernq)
# Calculate percentages
perq<-percenta(modernq,first=2,last=39)[,2:55]
# Cross-validation for Pinus
bcrossv.l1(modernq[,1],perq[,3])
Run the code above in your browser using DataLab