Learn R Programming

analogue (version 0.17-7)

bootstrap.wa: Bootstrap estimation and errors for WA models

Description

Function to calculate bootstrap statistics for transfer function models such as bootstrap estimates, model RMSEP, sample specific errors for predictions and summary statistics such as bias and \(R^2\) between oberved and estimated environment.

Usage

# S3 method for wa
bootstrap(object, n.boot = 1000, verbose = TRUE, ...)

Value

An object with the same components as predict.wa.

Arguments

object

an R object of class "wa" for which bootstrap statistics are to be generated.

n.boot

numeric; the number of bootstrap samples to draw.

verbose

logical; should bootstrap progress be printed to the console?

...

arguments passed to other methods.

Author

Gavin L. Simpson

Details

See bootstrap.mat for further details. This method is not as feature packed as bootstrap.mat but can be used to evaluate the model performance of WA transfer function models.

References

Birks, H.J.B., Line, J.M., Juggins, S., Stevenson, A.C. and ter Braak, C.J.F. (1990). Diatoms and pH reconstruction. Philosophical Transactions of the Royal Society of London; Series B, 327; 263--278.

See Also

wa, plot.wa.

Examples

Run this code
## Imbrie and Kipp
data(ImbrieKipp)
data(SumSST)
ik.wa <- wa(SumSST ~ ., data = ImbrieKipp, tol.dw = TRUE,
            min.tol = 2, small.tol = "min")
ik.wa

## compare actual tolerances to working values
with(ik.wa, rbind(tolerances, model.tol))

## bootstrap the WA model
ik.boot <- bootstrap(ik.wa, n.boot = 100)

## performance statistics
performance(ik.boot)

Run the code above in your browser using DataLab