POR_calc_AR1 {HyMETT} | R Documentation |
calculates lag-one autocorrelation (AR1) coefficient for a time series
Description
calculates lag-one autocorrelation (AR1) coefficient for a time series
Usage
POR_calc_AR1(data = NULL, Date, value, time_step = c("daily", "monthly"))
Arguments
data |
'data.frame'. Optional data.frame input, with columns containing |
Date |
'numeric' vector of Dates corresponding to each |
value |
'numeric' vector of values (often streamflow) when |
time_step |
'character' value. Either |
Details
The function calculates lag-one autocorrelation (AR1) coefficient for a time series using the
stats::ar
function. When applied to an observed or modeled time series of streamflow, the
POR_deseasonalize
function can be applied to the raw data prior to running the
POR_calc_AR1
function.
Value
A data.frame with calculated seasonal amplitude and phase.
References
Farmer, W.H., Archfield, S.A., Over, T.M., Hay, L.E., LaFontaine, J.H., and Kiang, J.E., 2014, A comparison of methods to predict historical daily streamflow time series in the southeastern United States: U.S. Geological Survey Scientific Investigations Report 2014–5231, 34 p. [Also available at https://doi.org/10.3133/sir20145231.]
See Also
Examples
POR_calc_AR1(data = example_obs, Date = "Date", value = "streamflow_cfs")