feedback.test: Test of feedback and change-in-feedback for a single time...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/feedback.R

Description

Randomization test to investigate the fragmented time directionality in a single time series and the temporal variation in the fragmented time directionality.

Usage

1
feedback.test(object, test, operator, nb.rand, plots = TRUE, turning.year = NULL)

Arguments

object

either a KDD object or a KDD.yearly.average object.

test

a character string specifying the type of test, must be one of "feedback" or "change.in.feedback".

operator

a character string specifying the transformation of the raw values, must be one of "dmv" or "dmpiv" (see section Details in after.minus.before).

nb.rand

a positive integer specifying the number of randomizations.

plots

a logical indicating if plots characterizing the test are produced (if plots = TRUE) or not (if plots = FALSE), default is TRUE.

turning.year

an optional numeric value specifying a temporal turning point in the data series, must be provided if operator = "change.in.feedback".

Details

If plots = TRUE, two plots are produced. The first plot gives the cumulative after-before difference (CABD; red curve) and for each CABD value the quantiles of order 0.025 (bottom dotted curve), 0.25 (bottom dashed curve), 0.5 (solid black curve), 0.75 (top dashed curve) and 0.975 (top dotted curve) under the null hypothesis that is tested (either no feedback or no change-in-feedback). The second plot gives the number of exits of the CABD function from the confidence intervals (red line) and the distribution of the number of exits under the null hypothesis that is tested (histogram).

Value

A numeric value providing the p-value of the test.

Author(s)

Samuel Soubeyrand Samuel.Soubeyrand@avignon.inra.fr, Cindy E. Morris, E. Keith Bigg.

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#### 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)

#### test feedback and change in feedback with a single data series
## using the thresholded data series
## using difference of means of positive indicator values (i.e. rainfall occurrence)
par(mfrow=c(1,2), mar=c(5.1,4.1,4.1,2.1))
feedback.test(object=KDD, test="feedback", operator="dmpiv", nb.rand=10^3, plots=TRUE)

FeedbackTS documentation built on Jan. 23, 2020, 5:06 p.m.