Usage
detrend(rwl, y.name = names(rwl), make.plot = FALSE, method = c("Spline", "ModNegExp", "Mean", "Ar", "Friedman"), nyrs = NULL, f = 0.5, pos.slope = FALSE, constrain.modnegexp = c("never", "when.fail", "always"), verbose = FALSE, return.info = FALSE, wt, span = "cv", bass = 0)
Arguments
rwl
a data.frame with series as columns and years as
rows such as that produced by read.rwl y.name
a character vector of
length(ncol(rwl)) that gives the ID of each
series. Defaults to the column names of rwl. make.plot
a logical flag. Makes plots of the raw data
and detrended data if TRUE. See details below.
method
a character vector to determine the detrending
methods. See details below. Possible values are all subsets of
c("Spline", "ModNegExp", "Mean", "Ar"). Defaults to using all the
available methods.
nyrs
a number giving the rigidity of the smoothing spline,
defaults to 0.67 of series length if nyrs is
NULL.
f
a number between 0 and 1 giving the frequency response or
wavelength cutoff. Defaults to 0.5.
pos.slope
a logical flag. Will allow for a positive
slope to be used in method "ModNegExp". If FALSE the
line will be horizontal.
constrain.modnegexp
a character string which controls
the constraints of the "ModNegExp" model. See
detrend.series for further details. verbose
logical. Write out details?
return.info
a logical flag. If TRUE, details
about models and data will be added to the return value. See
Value.
wt
a numeric vector of case weights for method
"Friedman". The default means equals weights.
span
a numeric value controlling method
"Friedman", or "cv" (default) for automatic choice by
cross-validation. See supsmu. bass
a numeric value controlling the smoothness of the
fitted curve in method "Friedman". See supsmu.