iid.test: iid test

Description Usage Arguments Value Author(s) Examples

Description

Test for whether a variable is independent and identically distributed (iid). Used in daily.station.records.

Reference:

Benestad, R.E., 2003: How often can we expect a record-event? Climate Research. 23, 3-13 (pdf)

Benestad, R.E., 2004: Record values, nonstationarity tests and extreme value distributions, Global and Planetary Change, vol 44, p. 11-26

The papers are available in the pdf format from http://regclim.met.no/results_iii_artref.html.

Note, gaps of missing data (NA) can bias the results and produce an under-count. The sign of non-iid behaviour is when the 'forward' analysis indicated higher number of record-events than the confidence region and the backward analysis gives lower than the confidence region.

Version 0.7: Added a test checking for dependencies based on an expected number from a binomial distribution and given the probability p1(n) = 1/n. This test is applied to the parallel series for one respective time (realisation), and is then repeated for all observation times. The check uses qbinom to compute a theoretical 95% confidence interval, and a number outside this range is marked with red in the 'ball diagram' (first plot). pbinom is used to estimate the p-value for the

Usage

1
2
iid.test(x,plot=TRUE,Monte.Carlo=TRUE,N.test=200,reverse.plot.reverse=TRUE)
n.records(x)

Arguments

x

A data matrix or a vector.

plot

Flag: plot the diagnostics.

Monte.Carlo

Flag: for estimating confidence limits.

N.test

Number of Monre-Carlo runs.

reverse.plot.reverse

TRUE: plots reverse from right to left, else left to right.

.

Value

list: 'record.density' and 'record.density.rev' for the reverse analysis. The variables CI.95, p.val, and i.cluster (and their reverse equivalents '.rev') return the estimated 95% conf. int, p-value, and the location of the clusters (binomial).

Author(s)

R.E. Benestad

Examples

1
2
3
dat <- rnorm(100*30)
dim(dat) <- c(100,30)
iid.test(dat)

metno/esd.test documentation built on May 22, 2019, 7:49 p.m.