predict.wa {analogue} | R Documentation |
Model predictions and cross-validation predictions for weighted averaging transfer function models.
## S3 method for class 'wa': predict(object, newdata, CV = c("none", "LOO", "bootstrap"), verbose = FALSE, n.boot = 100, ...)
object |
an object of class "wa" , usually the result of a
call to wa |
newdata |
An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used. |
CV |
Should cross-validation be performed? Leave-one-out
("LOO" ) and bootstrap ("bootstrap" ) CV are currently
available. |
verbose |
Should CV progress be printed to the console? |
n.boot |
The number of bootstrap smaples to draw. |
... |
further arguments passed to or from other methods. |
Not all CV methods produce the same output. CV = "bootstrap"
is
currently the only method that produces sample specific errors.
An object of class "predict.wa"
, a list with the following
components:
pred |
A list with components pred and rmsep
containing the predicted values and the sample specific errors if
available. |
performance |
A list with model performance statistics. |
model.pred |
A list with components pred and rmsep
containing the predicted values for the training set samples and the
sample specific errors if available. |
call |
the matched function call. |
CV.method |
The CV method used. |
Gavin L. Simpson
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.
wa
.
## continue the example from ?wa example(wa) ## load the RLGH data data(rlgh) rlgh <- rlgh / 100 ## Predict pH for the RLGH samples rlgh.pred <- predict(mod, rlgh, CV = "bootstrap", n.boot = 100) ## draw the fitted reconstruction reconPlot(rlgh.pred, use.labels = TRUE, display = "bars") ## extract the model performance stats performance(rlgh.pred)