fdnonpar-package: The fdnonpar package

Description Data classes, visualisation of data Manipulation and summary functions Tests Author(s) References Examples

Description

The package fdnonpar is a collection of tools for visualisation and nonparametric analysis of grouped data that consist of an independent (x-) variable and a dependent (y-) variable. Such data could be time series or values of a function, or generally any multivariate data. In the latter case, x is just an index variable.

The proposed tests do not take the x-variable into account. Since the x-values are usually equidistant, this does not really matter. In the current version (0.3), it is assumed that the data samples to be compared share the same (equidistant) x-variables.

Data classes, visualisation of data

fdsample basic data type, a sample of curves
fdenvelope two boundary curves of an envelope, a specialized fdsample object
print.fdsample print brief details of an fdsample
plot.fdsample plot the individual members of an fdsample
plot.fdenvelope plot an envelope object
summaryplot plot individual curves, envelopes or summary functions
such as the mean of an fdsample objectr

Manipulation and summary functions

[.fdsample extract or replace curves form a sample
apply.fdsample apply a summary function to the function values
mean.fdsample mean of the function values
median.fdsample median of the function values
quantile.fdsample quantiles of the function values
pwEnvelope pointwise envelope

Tests

tL2.permtest Comparison of two groups,
using square integrated Welch-t-statistic
rankEnv.test Rank envelope test: compare a single observation to a group (e.g. simulated data)
rankCount.test Rank count test: refined p-value for rank envelope test

Author(s)

Ute Hahn, ute@imf.au.dk

References

Hahn, U. (2012) A studentized permutation test for the comparison of spatial point patterns. Journal of the American Statistical Association 107 (498), 754–764.

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# simulated data sets, consisting of 8 and 9
x <- seq(0, 1, .1)
y1 <- replicate(8, rnorm(length(x), mean = x, sd = .2))
y2 <- replicate(7, rnorm(length(x), mean = x*1.3, sd = .2))
y1b <- replicate(7, rnorm(length(x), mean = x, sd = .2))

xy1 <- fdsample(x, y1)
xy2 <- fdsample(x, y2)
xy1b <- fdsample(x, y1b)

# visualize the data sets
# require plutils which contains the generic to "summaryplot"
require(plutils)

summaryplot(xy1, envprob=1)
summaryplot(xy1b, add = TRUE, col = "blue")
summaryplot(xy2, add = TRUE, col = "red")

# there should be significant difference between xyl1
# and xyl2, but not between xyl1 and xyl1b.
# However, with simulated data, everything is possible...

tL2.permtest(xy1, xy2)
tL2.permtest(xy1, xy1b)

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