permute_pointwiseT: Permutation test between two sets of curves

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

View source: R/permute_pointwiseT.R

Description

Permutation test between two sets of curves using T-type test statistic

Usage

1
2
permute_pointwiseT(Mat1, Mat2, Nperm = 200, argvals, q = 0.05, 
                   returnPlot = TRUE, TitleText = "")

Arguments

Mat1

Matrix 1 with each column being the discretized version of a separate curve

Mat2

Matrix 2 with each column being the discretized version of a separate curve

Nperm

Number of permutations. Default 200

argvals

The abscissa, the x-axis or the time-axis. The length of this should be the same as the number of rows of Mat1 and Mat2

q

0.05 or an appropriate α level

returnPlot

Whether to return the permutation distribution plot

TitleText

A text intended to be appended to ggtitle

Details

This is the permutation test, testing the hypothesis H_0: F_{Y_1} = F_{Y_2}

Value

pval

p-value of the permutation test

qval

q-value of the permutation test

Tobs

Observed value of the test statistic

Tvals

Observed pointwise values of T, along the argvals

Tnull

Null distribution of the test statistic

Tnullvals

Observed pointwise values of T, along the argvals, for all permutations

qvals.pts

Pointwise q-value, along the argvals

pvals.pts

Pointwise p-value, along the argvals

TPlot

Plot of Tobs in the Tnull distribution

Plot_pval

Plot of pointwise p-values, along the argvals

Note

This is an adaptation of the function fda::tperm.fd. The theory was first described in book mentioned in the references.

Author(s)

Subhrangshu Nandi; Statistics PhD student, UW Madison; snandi@wisc.edu or nands31@gmail.com

References

Graves, S., Hooker, G., & Ramsay, J. (2009). Functional data analysis with R and MATLAB. (Sec 10.5.1)

See Also

fda::tperm.fd

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data( growth, package = 'fda' )
Mat1 <- growth[['hgtm']]
Mat2 <- growth[['hgtf']]
Arguments <- growth[['age']]
PermTestResults <- permute_pointwiseT(
  Mat1 = Mat1, 
  Mat2 = Mat2, 
  Nperm = 200,
  argvals = Arguments,
  q = 0.05,
  returnPlot = TRUE,
  TitleText = 'Growths of boys and girls (Berkeley growth data)'
)
names(PermTestResults)

snandi/Registration documentation built on May 30, 2019, 5:04 a.m.