tL2.permtest: Integrated Welch-t Squared Permutation Test for Two Samples...

Description Usage Arguments Details Value Author(s) Source References Examples

Description

Perform a permutation test of equal distribution (mean) for two samples of functional or multivariate data.

Usage

1
tL2.permtest(sample1, sample2, nperm = 25000, use.tbar = FALSE)

Arguments

sample1,sample2

lists of function values, object of type fdsample, need to have identical x-values.

nperm

NULL or an integer giving the number of random permutations. If NULL, all permutations are used. Only feasible if group sizes m_1, m_2 do not exceed 10. Default value is 25000, thus all permutations will be used on groups with m_1 = m_2 =9.

use.tbar

logical, defaults to FALSE. If TRUE, integrated squared mean differences are divided by integrated variance, see ‘Details’.

Details

Test statistics are integral means of studentized square distances between the group means. The test statistics are closely related, but not equal to Hotelling's two-sample T-squared statistic. It is assumed that the functions all have the same, equidistant arguments. Depending on the value of use.tbar, the test statistic is either

where m_1 m_2 denote the group sizes for sample1 and sample2, and mu_1(x), mu_2(x) and s_1^2(x), s_2^2(x) are within group means and variances at a fixed argument x. To calculate T, the mean is taken over all n arguments x.

If nperm is given as an integer, the permutations are sampled randomly, unless nperm is larger than the number of disjoint combinations. In that case, and also if nperm == NULL, the exact test with all permutations is used (combinations, for symmetry reasons). If this causes memory or computing time issues, set nperm to a fixed value.

Value

A list with class "htest" containing the following components:

statistic

the value of the test statistic,

p.value

the p-value of the test,

alternative

a character string describing the alternative hypothesis,

method

a character string indicating what type of test was performed,

data.name

a character string giving the name(s) of the data.

Author(s)

Ute Hahn, ute@imf.au.dk

Source

Hahn(2012), with slight modification (using the mean instead of the integral, in order to avoid having to pass the arguments of the functions)

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.

Examples

1
2
# test the difference of atlantic and continental Canadian temperature curves
tL2.permtest(TempAtla, TempCont, nperm = 999)

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