curvi | R Documentation |
Generates a matrix for curvi-linear modeling of trends.
curvi(x, ..., style = c("mw", "se"))
x |
a vector of dates/times, assumed to be in dectime format. Missing values are permitted and result in corresponding missing values in the output. |
style |
either "mw" for midpoint time and halfwidth, or "se" for start and end times. |
... |
paired vectors specifying the midpoint of the trend and the halfwidth, or the start and end times. |
Curvi-linear trends are described in Appendix 1 (equations 1–9 through 1–11) in Vecchia (2005). The original form of the trend was described in terms of the midpoint of the trend and the halfwidth. Specifying the start and end times of the trend are added as an easy-to-use option.
A matrix with one column for each of the trends sprecified in ....
Curvi-linear trends provide a pleasing visual trend with a gradual
transition between trends in contrast to linear trends with sharp changes at
the endpoints.
Each trend is 0 prior to the start, and then increases to
a maximum of 1 and maintain that maximum value after the end. The overall
change is described by the regresison coefficient, rather than as a rate
described by trends
, for example.
Vecchia, A.V., 2005, Water-quality trend analysis and sampling desgin for streams in the Red River fo the North basin, Minnesota, Norht Dakota, and South Dakota, 1970–2001: U.S. Geolgical Survey Scientific Investigations Report 2005–5224, 54 p. Available on line at http://pubs.usgs.gov/sir/2005/5224/.
trends
,
# Model with a single curvi-linear trend from 2001 through 2003 # First using midpoint and half width (default) and then start and end. curvi(2000 + seq(0,20)/5, c(2002, 1)) curvi(2000 + seq(0,20)/5, c(2001, 2003), style="se")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.