Calculate the seasonal amplitude and phase of a daily time series
Calculate the seasonal amplitude and phase of a daily time series
Calculates the seasonal amplitude and phase of a daily time series.
POR_calc_amp_and_phase( 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", Default is "daily".
Returns
A data.frame with calculated seasonal amplitude and phase
Examples
POR_calc_amp_and_phase(data = example_obs, Date ="Date", value ="streamflow_cfs")
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.]