LWR: Weighted averaging (LWR) regression and calibration

View source: R/LWR.r

LWRR Documentation

Weighted averaging (LWR) regression and calibration

Description

Functions for reconstructing (predicting) environmental values from biological assemblages using weighted averaging (LWR) regression and calibration.

Usage

LWR(y, x, FUN=WA, dist.method="sq.chord", k=30, lean=TRUE, 
       fit.model=TRUE, check.data=TRUE, verbose=TRUE, ...)

## S3 method for class 'LWR'
 predict(object, newdata=NULL, k = object$k, sse=FALSE, 
      nboot=100, match.data=TRUE, verbose=TRUE, lean=TRUE, ...)

## S3 method for class 'LWR'
crossval(object, k=object$k, cv.method="lgo", verbose=TRUE, 
      ngroups=10, nboot=100, h.cutoff=0, h.dist=NULL, ...)

## S3 method for class 'LWR'
performance(object, ...)

## S3 method for class 'LWR'
print(x, ...)

## S3 method for class 'LWR'
summary(object, full=FALSE, ...)

## S3 method for class 'LWR'
residuals(object, cv=FALSE, ...)

## S3 method for class 'LWR'
fitted(object, ...)

Arguments

y

a data frame or matrix of biological abundance data.

x, object

a vector of environmental values to be modelled or an object of class LWR.

dist.method

distance measure used to derfine closest analogues.

k

number of close analogues to use in calibration function.

FUN

calibration function (e.g. WA, WAPLS etc).

newdata

new biological data to be predicted.

fit.model

TRUE fits model to training set. FALSE omist this step and builds a LWR object than can be used for prediction.

check.data

logical to perform simple checks on the input data.

full

logical to show head and tail of output in summaries.

match.data

logical indicate the function will match two species datasets by their column names. You should only set this to FALSE if you are sure the column names match exactly.

lean

logical to exclude some output from the resulting models (used when cross-validating to speed calculations).

cv.method

cross-validation method, either "lgo" or "bootstrap".

verbose

logical to show feedback during cross-validaton.

nboot

number of bootstrap samples.

ngroups

number of groups in leave-group-out cross-validation.

h.cutoff

cutoff for h-block cross-validation. Only training samples greater than h.cutoff from each test sample will be used.

h.dist

distance matrix for use in h-block cross-validation. Usually a matrix of geographical distances between samples.

sse

logical indicating that sample specific errors should be calculated.

cv

logical to indicate model or cross-validation residuals.

...

additional arguments.

Details

Function LWR performs ... To do.

Value

Function LWR returns an object of class LWR with the following named elements:

Author(s)

Steve Juggins

See Also

WAPLS, MAT, and compare.datasets for diagnostics.


nsj3/rioja documentation built on Oct. 24, 2023, 1:37 a.m.