bcrossv.l(x, y, interval = c(0.15, 1, 0.05), trials = c(10, 0.25), plot = TRUE)
interval
and degree 1 and 2 are contained in the first and second columns. The third column contains the root of the predictive squared error (rse, (1/n*sum(est-obs)^2)^0.5). The fourth column contains the root mean squared error (rmse, 1/n*sum(abs(obs-est))). If plot=TRUE
, a scatter plot of the rse and the rmse conditioned to the degree of the loess regression is produced.This function involves very intensive computations. Therefore, the user must find a balance between values of interval
and trials
, and the computational capabilities. Large number of trials may require long computation times.
interval
(from 0.15 to 1 in 0.05 increments). The sequence of $\alpha$ values is combined with degree 1 and 2, and the LOESS regression produced using each combination is cross-validated as explained in bcrossv.l1
. See Cleveland and Devlin (1988) for details on loess regression.
loess
for details on loess regression. bcrossv.l1
for details on the bootstrap cross-validation.
data(modernq)
# Calculate percentages
perq<-percenta(modernq,first=2,last=39)[,2:55]
# Cross-validation for Pinus
bcrossv.l(modernq[,1],perq[,3],trials=c(10,0.1))
Run the code above in your browser using DataLab