rankCount.test: Rank count test of goodness of fit

Description Usage Arguments Details Author(s) References Examples

View source: R/rankcounttest.R

Description

Test if an observed curve matches a sample of simulated curves (or a group of other observations). Refines the result of the rank envelope test, but does not have a direct graphical representation.

Usage

1
2
rankCount.test(obs, sim, alternative = c("two.sided", "less", "greater"),
  inclprob = c(0.95))

Arguments

obs

object of class fdsample, the observed curve.

sim

object of class fdsample, the group of curves to which obs is compared.

alternative

a character string specifying the alternative hypothesis, one of "two.sided" (default), "less" or "greater". May be abbreviated.

inclprob

a numerical vector of inclusion probabilities of the envelopes to be plotted, for use in plot.envtest

Details

The observed curve, represented by the fdsample object obs is compared to simulated curves collected in the fdsample object 'sim. The two sets of curves have to share the same argument values, and obs is supposed to contain only one curve.

alternative == "less" is the one-sided alternative meaning that the observed curve has (some) smaller function values than the simulated curves, and alternative == "greater" is the opposite one-sided alternative.

The p-value is obtained by ranking the curves according to the number of minimum pointwise ranks obtained in any point of the curve (curves are actually represented as vectors), see Myllymaki et al. (2015).

Author(s)

Ute Hahn, ute@imf.au.dk

References

M. Myllymaki, T. Mrkvicka, P. Grabarnik, H. Seijo and U.Hahn (2015) Global envelope tests for spatial processes, http://arxiv.org/abs/1307.0239v3.

Examples

1
2
3
4
5
6
7
8
9
# make a sample of sinus curves
tt <- seq(0, 2*pi, length = 20)
sinsim <- replicate(5000, sin(tt) + cumsum(rnorm(20, 0, 0.01)))
sinobs <- sin(tt - pi/50) + cumsum(rnorm(20, 0, 0.01))
sim <- fdsample(tt, sinsim)
obs <- fdsample(tt, sinobs)

testresult <- rankCount.test(obs, sim)
print(testresult)

fdnonpar documentation built on May 2, 2019, 5:54 p.m.