predLoad: Predict Loads

Description Usage Arguments Details Value See Also Examples

View source: R/predLoad.R

Description

Estimate loads from a rating-curve model from loadReg for a new data frame, aggregating the loads by specified time periods.

Usage

1
2
3
predLoad(fit, newdata, load.units = fit$load.units, by = "total",
  seopt = "exact", allow.incomplete = FALSE, conf.int = 0.95,
  print = FALSE)

Arguments

fit

the output from loadReg.

newdata

a data frame of the prediction variables. Missing values are not permitted in any column in newdata. Observations with missing values NAs must be removed before prediction. Columns that are not needed for prediction that contain missing values can be removed before removing all rows with missing values. The maximum number of rows permitted in newdata is 176000.

load.units

a character string indicating the units of the predicted loads/fluxes. By default, uses the value specified in loadReg. See loadReg for a complete list of options.

by

the time frame for estimates. See Details.

seopt

a character string indicating how to comute the standard error of the aggregated load estimates, must be either "exact" or "approximate." Only the first letter is necessary.

allow.incomplete

compute loads for periods withing missing values or incomplete record? See Details.

conf.int

the confidence interval to compute for loads computed by "day" or "unit." The confidence interval is fixed at 0.95 for any other value for by. See Details.

print

print a report summary of the load estimate?

Details

The time frame specified by by can be "unit," "day," "month," "water year," "calendar year," "total," or the name of a column in newdata that can be used to group the data.

If allow.incomplete is TRUE, then loads will be computed based on all nonmissing values, otherwise missing values NAs will be returned. For this application, missing values includes NAs and gaps in the record, except for by set to "total" or user defined groups where missing values only includes NAs. For prediction by "day" when there are variable number of unit values per day, allow.incomplete must be set to TRUE.

The term confidence interval is used here as in the original documentation for LOADEST, but the values that are reported are the prediction intervals, computed from the SEP.

Value

A data frame containing the load estimates.

See Also

loadReg,

Examples

1
2
3
4
5
6
# From application 1 in the vignettes
data(app1.calib)
app1.lr <- loadReg(Phosphorus ~ model(1), data = app1.calib, 
 flow = "FLOW", dates = "DATES", conc.units="mg/L",
 station="Illinois River at Marseilles, Ill.")
predLoad(app1.lr, app1.calib)

USGS-R/rloadest documentation built on Oct. 2, 2020, 5:21 a.m.