feedback.stats {FeedbackTS} | R Documentation |
Computation of feedback and change-in-feedback statistics
Description
Computation of temporal averages of after-before differences around key days calculated from a time series and computation of the difference in the temporal averages around a turning point in time.
Usage
feedback.stats(object, operator, turning.year = NULL,
trend.correction = list( apply = FALSE , object2 = NULL ))
Arguments
object |
either a KDD object or a KDD.yearly.average object. |
operator |
a character string specifying the transformation of the raw values, must be one of |
turning.year |
an optional numeric vector of years used to specify turning points in the data series. |
trend.correction |
an optional list of two items: the |
Details
The function computes the following temporal averages of after-before differences around key days calculated from a time series:
where is a set of key days,
is the number of key days in
, and
is an after-before difference computed for each key day
(see below and in after.minus.before function).
If operator = "dmv"
(difference of mean values), the raw values of the time series are used to compute the difference:
where is the date of the key day,
is the number of days considered around the key day (specified when
data
is provided).
If operator = "dmpiv"
(difference of means of positive indicator values), the raw values are used to compute the difference:
where is the indicator function.
If operator = "dmgiv"
(difference of means of greater indicator values), the raw values are used to compute the difference:
If turning.year = NULL
, the function computes
where
is the set of all key days in the whole time series.
If turning.year
is a numeric vector, for each value in
turning.year
the function computes with
equal to the set of key days in the whole time series, in the time
series before
and in the time series after
. The function
also computes, for each value
, the difference between the
temporal averages of after-before differences after
and before
.
If trend.correction$apply = TRUE
, a trend correction is applied
to take into account, for example, seasonal effect in the time series
(see Morris et al., 2016).
Value
If turning.year = NULL
, a numeric equal to the temporal average of after-before differences around key days calculated from the whole time series.
If turning.year
is a numeric vector, a numeric vector providing:
- –
the temporal average of after-before differences around key days calculated from the whole time series;
- –
for each value
in
turning.year
,- –
the temporal average
of after-before differences around key days calculated from the time series right-truncated at time
;
- –
the temporal average
of after-before differences around key days calculated from the time series left-truncated at time
;
- –
the difference
.
Author(s)
Samuel Soubeyrand Samuel.Soubeyrand@avignon.inra.fr, Cindy E. Morris, E. Keith Bigg.
References
Morris, C.E., Soubeyrand, S.; Bigg, E.K., Creamean, J.M., Sands, D.C. (2016). Rainfall feedback maps: a tool to depict the geography of precipitation's sensitivity to aerosols. INRA Research Report.
Soubeyrand, S., Morris, C. E. and Bigg, E. K. (2014). Analysis of fragmented time directionality in time series to elucidate feedbacks in climate data. Environmental Modelling and Software 61: 78-86.
See Also
KDD, KDD.yearly.average, kdd.from.raw.data, after.minus.before, rain.site.6008, rain.feedback.stats
Examples
#### load data for site 6008 (Callagiddy station)
data(rain.site.6008)
#### build KDD objects from raw data (site 6008: Callagiddy station)
## using a threshold value equal to 25
KDD=kdd.from.raw.data(raw.data=rain.site.6008, keyday.threshold=25, nb.days=20,
col.series=5, col.date=c(2,3,4), na.rm=TRUE, filter=NULL)
#### main feedback statistic
feedback.stats(KDD, "dmv")
#### main and auxiliary feedback statistics
feedback.stats(KDD, "dmv", turning.year=c(1960,1980))
#### apply a trend correction
## define the KDD object used for trend correction (it is defined as
## KDD above except that the threshold value is equal to 0)
KDD2=kdd.from.raw.data(raw.data=rain.site.6008, keyday.threshold=0, nb.days=20,
col.series=5, col.date=c(2,3,4), na.rm=TRUE, filter=NULL)
## compute the statistic
feedback.stats(KDD, "dmv", trend.correction=list(apply=TRUE, object2=KDD2))