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 and value. Column names are specified as strings in the corresponding parameter. Default is NULL.

Date

'numeric' vector of Dates corresponding to each value when data = NULL, or 'character' string identifying Date column name when data is specified.

value

'numeric' vector of values (often streamflow) when data = NULL, or 'character' string identifying value column name when data is specified. Assumed to be daily or monthly.

time_step

'character' value. Either "daily" or "monthly".

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

POR_deseasonalize, ar

Examples

POR_calc_AR1(data = example_obs, Date = "Date", value = "streamflow_cfs")


[Package HyMETT version 1.1.2 Index]