seasonalPeak | R Documentation |
Computes the timing of the seasonal peak value. The timing of the seasonal peak is needed for the seasonalWave model (Vecchia and others, 2008).
seasonalPeak(x, y)
x |
a vector of decimal time representing dates and times. Missing values are permitted and are removed before analysis. |
y |
a vector of the data for which the peak is needed. Missing values are permitted and are removed before analysis. |
The timing of the peak of the data is computed by identifying the largest
value produced by smoothing that data with supsmu
. The remaining data
in the attributes are used by using the seasonalPeak method of confirm.
An object of class seasonalPeak. The unconfirmed object is a single
value that represents the estimate of the timing of the peak and five
additional attributes.
Data: a list of the x
and y
values where x is the fractional
part of the original decimal time data. Missing values have been removed.
Smooth: a list of the x
and y
smoothed values.
Points: a
list of 361 evenly spaced xout and yout values.
Extra: pointers to all
the peaks in Points
.
Confirmed: logical indicating that the
object has not been confirmed.
The generic functions print and confirm have methods for object of class seasonalPeak.
Vecchia, A.V., Martin, J.D., and Gilliom, R.J., 2008, Modeling variability and trends in pesticide concentrations in streams: Journal of the American Water Resources Association, v. 44, no. 5, p. 1308-1324
seasonalWave
, confirm.seasonalPeak
,
supsmu
, print.seasonalPeak
library(smwrData) data(QW05078470) with(QW05078470, seasonalPeak(dectime(DATES), P00665)) ## Should be: # Default value: 0.499 # Alternate values: 0.497
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.