Learn R Programming

realTimeloads (version 1.0.0)

compute_load: Compute load with uncertainty on concentration estimates

Description

Compute load with uncertainty on concentration estimates from bootstrap regression after Rustomji and Wilkinson (2008)

Usage

compute_load(Surrogate, Discharge, Regression, period = NULL)

Value

list with data frames of estimated concentration and flux used to compute load (i.e., the sum of flux)

Arguments

Surrogate

data frame with time (PosixCt) and surrogate(s) (x,...)

Discharge

data frame with time (PosixCt) and discharge in cubic meters per second

Regression

data frame from bootstrap_regression() that determines analyte(surrogate)

period

two element vector time (PosixCt) indicating period over which load is computed

Warning

Discharge should be in cubic meters per second

Analyte concentration estimated from surrogate should be in milligrams per second

Author

Daniel Livsey (2023) ORCID: 0000-0002-2028-6128

References

Rustomji, P., & Wilkinson, S. N. (2008). Applying bootstrap resampling to quantify uncertainty in fluvial suspended sediment loads estimated using rating curves. Water resources research, 44(9).https://doi.org/10.1029/2007WR006088

Helsel, D.R., Hirsch, R.M., Ryberg, K.R., Archfield, S.A., and Gilroy, E.J., 2020, #' Statistical methods in water resources: U.S. Geological Survey Techniques and Methods, book 4, chap. A3, 458 p. https://doi.org/10.3133/tm4a3

Examples

Run this code
# \donttest{
Turbidity_FNU <- realTimeloads::ExampleData$Sonde$Turbidity
TSS_mg_per_l <- realTimeloads::ExampleData$Sediment_Samples$SSCpt_mg_per_liter
Discharge <- realTimeloads::ExampleData$Discharge
Calibration <- data.frame(Turbidity_FNU,TSS_mg_per_l)
time <- realTimeloads::ExampleData$Sonde$time
Surrogate <- data.frame(time,Turbidity_FNU)
Regression = bootstrap_regression(Calibration,'TSS_mg_per_l~Turbidity_FNU')
period <- c(as.POSIXct("2000-02-16 AEST"),as.POSIXct("2000-03-16 AEST"))
Output <- compute_load(Surrogate,Discharge,Regression,period)
# }

Run the code above in your browser using DataLab