hysteresis | R Documentation |
Compute a basis for estimating hysteresis effects in some variable related to
the argument x
.
hysteresis(x, step = 3)
x |
the sequence of observations. Missing values are permitted and will be copied in the output. |
step |
the number of previous observations to use to compute the local mean. See Note. |
A numeric vector that approximates the local trend in x
.
The basis for estimating hysteresis is the current value x
minus
the mean of the previous step
values. The first step
values in
the output will be missing, and each missing value will result in step
plus 1 missing values. This approximates the trend in x
; if x
is
increasing in value over the previous step
values, then the output will be positive
and the greater the relative increase, the larger the output.
The use of hysteresis to help model the relations between stream water chemistry
and flow are described in:
Garrett, J.D., 2012, Concentrations, loads, and yields of select constituents from major tributaries of the Mississippi and Missouri Rivers in Iowa, water years 2004-2008: U.S. Geological Survey Scientific Investigations Report 2012–5240, 61 p.
Wang, P., and Linker, L.C., 2008, Improvement of regression simulation in fluvial sediment loads: Journal of Hydraulic Engineering, v. 134, no. 10, p. 1,527–1,531.
anomalies
## Not run: library(smwrData) data(Q05078770) # Plot flow and hysteresis to show looping with(Q05078770, plot(log(FLOW), hysteresis(log(FLOW), 3), type="l")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.