rcgam: Rating-curve generalized additive model

Description Usage Arguments Details

View source: R/rcgam.R

Description

Fits generalized additive models to log-log relationships using 'mgcv::gam', but incorporates aspects specific to hydrologic rating curves. Specifically, tracks the geometric mean of flow and concentration, adjusts for transformation bias, and calculates relevant fit statistics such as Nash-Sutcliffe efficiency (NSE)

Usage

1
rcgam(formula, data, timeout = 3, ...)

Arguments

formula

a GAM formula. See 'help("gam", package = "mgcv")' for details.

data

an object of class rcData, generated using 'makeModelData', or a data frame that makeModelData can use.

timeout

the amount of time in seconds to try mgcv::gam before stopping with a timeout error

...

further arguments passed to 'mgcv::gam'

Details

Dots get passed to mgcv::gam() call. All logarithms are base e (natural log) Arguments ending in "var" are names of objects that will be assigned in the function. logflowvar and logcvar will be shifted to have mean zero. POSSIBLY CHANGE THIS?


markwh/rcmodel documentation built on May 21, 2019, 12:26 p.m.