permute_pointwiseD: Permutation test between two sets of curves, with max...

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

View source: R/permute_pointwiseD.R

Description

Permutation test between two sets of curves, with max pointwise difference

Usage

1
2
permute_pointwiseD(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

Dobs

Observed value of the test statistic

Dvals

Observed pointwise values of D, along the argvals

Dnull

Null distribution of the test statistic

Dnullvals

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

qvals.pts

Pointwise q-value, along the argvals

pvals.pts

Pointwise p-value, along the argvals

DPlot

Plot of Dobs in the Dnull distribution

Plot_pval

Plot of pointwise p-values, along the argvals

Author(s)

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

See Also

permute_pointwiseT

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_pointwiseD(
  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.