predictSolute.loadLm: Make flux or concentration predictions from a loadLm model.

Description Usage Arguments Value See Also

Description

Makes instantaneous predictions (at the temporal resolution of newdata) from a fitted loadLm model. See predictSolute for details.

Usage

1
2
3
4
5
6
7
## S3 method for class 'loadLm'
predictSolute(load.model, flux.or.conc = c("flux", "conc"),
  newdata, interval = c("none", "confidence", "prediction"), level = 0.95,
  lin.or.log = c("linear", "log"), se.fit = FALSE, se.pred = FALSE,
  date = FALSE, attach.units = FALSE, agg.by = c("unit", "day", "month",
  "water year", "calendar year", "total", "mean water year",
  "mean calendar year", "[custom]"), ...)

Arguments

load.model

A loadLm object.

flux.or.conc

character. Should the predictions be reported as flux rates or concentrations?

newdata

data.frame, optional. Predictor data. Column names should match those given in the loadLm metadata. If newdata is not supplied, the original fitting data will be used.

interval

character. One of "none", "confidence" or "prediction". If "confidence" or "prediction", the interval bounds will be returned in columns named "lwr" and "upr". Confidence intervals describe confidence in the model prediction for the mean value given a set of predictors, whereas prediction bounds describe the expected distribution of observations at that prediction point.

level

numeric. Fraction of density distribution to include within confidence or prediction interval

lin.or.log

character. Either "linear" or "log" to say whether the predictions should be converted to log space or not. If converted to log space, a bias correction will be applied, see linToLog.

se.fit

logical. If TRUE, the output data.frame will include a column named "se.fit" describing the standard error of the model fit for each row of predictors.

se.pred

logical. If TRUE, the output data.frame will include a column named "se.pred" describing the standard error of the prediction for each row of predictors. The values in the se.pred column will be larger than those in the se.fit column, because the se.pred values are standard errors of prediction (SEPs) and take into account not only the parameter uncertainty associated with the model coefficients (also covered by se.fit), but also the random error associated with any given observation (the epsilon term in a typical regression model).

date

logical. If TRUE, the output data.frame will include a column named "date" containing the dates of the predictions.

attach.units

logical. Should the units be attached to columns in the resulting data.frame?

agg.by

character Time period to aggregate results by.

...

Additional arguments passed to class-specific implementations of the predictSolute generic function.

Value

A vector of data.frame of predictions, as for the generic predictSolute.

See Also

Other predictSolute: predictSolute.loadComp, predictSolute.loadInterp, predictSolute.loadModel, predictSolute.loadReg2, predictSolute


McDowellLab/loadflex documentation built on May 8, 2019, 9:48 a.m.