predConc: Predict Concentrations

Description Usage Arguments Details Value See Also Examples

View source: R/predConc.R

Description

Estimate concentrations from a rating-curve model from loadReg for a new data frame.

Usage

1
2
predConc(fit, newdata, by = "day", allow.incomplete = FALSE,
  conf.int = 0.95)

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.

by

the time frame for estimates. See Details.

allow.incomplete

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

conf.int

the confidence interval to compute for concentrations. See Details.

Details

The time frame specified by by must be either "unit" or "day."

If allow.incomplete is TRUE, then concentrations will be computed based on all nonmissing values, otherwise missing values NAs will be returned. For this application, missing values includes NAs and incomplete days. 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 concnetration 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.")
predConc(app1.lr, app1.calib)

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