| WAPLS.w | R Documentation |
WA-PLS training function, which can perform fx correction.
1/fx^2 correction will be applied at step 7.
WAPLS.w(
modern_taxa,
modern_climate,
nPLS = 5,
usefx = FALSE,
fx_method = "bin",
bin = NA
)
modern_taxa |
The modern taxa abundance data, each row represents a sampling site, each column represents a taxon. |
modern_climate |
The modern climate value at each sampling site. |
nPLS |
The number of components to be extracted. |
usefx |
Boolean flag on whether or not use |
fx_method |
Binned or p-spline smoothed |
bin |
Binwidth to get fx, needed for both binned and p-splined method.
if |
A list of the training results, which will be used by the predict function. Each element in the list is described below:
fitthe fitted values using each number of components.
xthe observed modern climate values.
taxon_namethe name of each taxon.
optimumthe updated taxon optimum (u* in the WA-PLS paper).
compeach component extracted (will be used in step 7 regression).
utaxon optimum for each component (step 2).
za parameter used in standardization for each component (step 5).
sa parameter used in standardization for each component (step 5).
ortha list that stores orthogonalization parameters (step 4).
alphaa list that stores regression coefficients (step 7).
meanxmean value of the observed modern climate values.
nPLSthe total number of components extracted.
fx, TWAPLS.w, and
WAPLS.predict.w
## Not run:
# Load modern pollen data
modern_pollen <- read.csv("/path/to/modern_pollen.csv")
# Extract taxa
taxaColMin <- which(colnames(modern_pollen) == "taxa0")
taxaColMax <- which(colnames(modern_pollen) == "taxaN")
taxa <- modern_pollen[, taxaColMin:taxaColMax]
# Training
fit_Tmin <- fxTWAPLS::WAPLS.w(taxa, modern_pollen$Tmin, nPLS = 5)
fit_f_Tmin <- fxTWAPLS::WAPLS.w(
taxa,
modern_pollen$Tmin,
nPLS = 5,
usefx = TRUE,
fx_method = "bin",
bin = 0.02
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.