selBestWave | R Documentation |
Selects the "best" parameters for a seasonal wave fit.
selBestWave(formula, data, dec.time, wave.list, exhaustive = FALSE, Regression = lm, Test = AIC, ...)
formula |
the formula describing the model without a
|
data |
the data.frame that contians the veriable specified in the formula. |
dec.time |
a character string of the name of the column in |
wave.list |
an object of class "seasonalPeak" (confirmed) describing the timing of the peak and potential candidate models. |
exhaustive |
logical; if TRUE, then do a fairly complete search for the
timing of the peak, otherwise accept the timing specified in
|
Regression |
the regression function. |
Test |
the function to perform the comparison test among all of the candidate models. |
... |
any additional arguments to |
For logistic regression, use Regression
=glm
,
Test
=deviance
, family=binomial(link="logit")
.
A 4- or 7-column matrix of the "best" models. The columns are the
timing of the peak (Cmax
), the primary peak loading (Loading
),
the half life (Hlife
), and the test score (Test
). If the model
is a two-peak model, then additional columns (la
, lo
, and
w
) describeing the second peak are included.
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.
## See the SeasonalWave demo
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.