Description Usage Arguments Details Value Author(s) References See Also Examples
This function applies repeated v-fold cross-validation to the synthetic assemblages fossil estimations, producing an estimation of the error associated with the reconstruction.
1 2 | bcrossv.sa(x, y, z, delta, method = "canberra", quant = 0.05,
trials = c(10, 0.05), detrend = FALSE)
|
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. See synthetic for details |
z |
A matrix containing the parameters for the LOESS regression of each species (α and degree in that order). Objects produced by |
delta |
Increments for the LOESS regression prediction. See |
method |
Corresponds to methods available in |
quant |
The quantile of the distances that will be used to obtain the mean environmental parameter. See |
trials |
Values for number of repetitions of the crossvalidation (10 by default), and proportion of observations to be left out each time the CV is repeated (5 percent of observations by default). The observations left out each time are randomly selected with replacement. |
detrend |
Whether or not a detrending procedure is desired. |
Detrending is used when the distribution of residuals along estimated values produces a heteroscedastic pattern. The evaluation of such a pattern is done by fitting a linear regression of residuals as a function of estimated values (RES=a+b*ESTIMATE). The significance of the regression is given in terms of its intercept, slope, and p-value, which are shown in the coef
component of the list produced when applying the function with detrend=FALSE
. If the regression is significant, it is recommended to run the analysis again using detrend=TRUE
. The detrending is done translating the estimated values using the found regression line (DETRENDED ESTIMATE = ESTIMATE + (a + b*ESTIMATE)).
A list containing:
estimated |
A matrix with three columns: observed, estimated and error. If |
error |
A matrix displaying squared sum of errors ( |
coef |
A matrix containing intercept, slope and p-value of the residuals vs estimates regression. |
transl |
The average error that is added or substracted to each estimate. Only relevant if |
If detrend=FALSE
, a figure shows residuals distribution along estimated (upper panel) and observed values (lower panel). If detrend=FALSE
, a figure shows residuals distribution along estimates (upper panel) and detrended estimates (lower panel).
Alexander Correa-Metrio.
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
synthetic
, fossil.dist
, fossil.values
, syas
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | data(modernq,fossilq)
# Calculate percentages
perq<-percenta(modernq,first=2,last=39)[,2:55]
# filter data set to include only samples with at least 0.5
# percent in 20 percent of the samples
perq1<-filter.p(perq,presen=0.5,persist=0.2)$filtered
# calculate alpha and degree for each taxon through AIC
a.d<-akaike.all(modernq[,1],perq1)
# select taxa that have acceptable dispersion and normally
# distributed residuals in percentages and AIC matrices
perq2<-perq1[,-c(3:5,8,17,19)]
#cross-validation without detrending
bcrossv.sa(modernq[,1],perq2,a.d,delta=25,method="canberra",quant=0.05,
trials=c(5, 0.05),detrend=FALSE)
#cross-validation with detrending
bcrossv.sa(modernq[,1],perq2,a.d,delta=25,method="canberra",quant=0.05,
trials=c(5, 0.05),detrend=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.