Permutation-based computation of p-values
permut_pval.Rd
Computation of the p-values associated to any statistics described in the package with the permutation methods. See Smida et al (2022) for more details.
Usage
permut_pval(MatX, MatY, n_perm = 100, stat = c("mo", "med"), verbose = FALSE)
Arguments
- MatX
numeric matrix of dimension
n_point x n
containingn
trajectories (in columns) of sizen_point
(in rows).- MatY
numeric matrix of dimension
n_point x m
containingm
trajectories (in columns) of sizen_point
(in rows).- n_perm
integer, number of permutation to compute the p-values.
- stat
character string or vector of character string, name of the statistics for which the p-values will be computed, among
"mo"
,"med"
,"wmw"
,"hkr"
,"cff"
.- verbose
boolean, if TRUE, enable verbosity.
Value
list of named numeric value corresponding to the p-values for each
statistic listed in the stat
input.
References
Zaineb Smida, Lionel Cucala, Ali Gannoun & Ghislain Durif (2022) A median test for functional data, Journal of Nonparametric Statistics, 34:2, 520-553, doi:10.1080/10485252.2022.2064997 , hal-03658578
Examples
# simulate small data for the example
simu_data <- simul_data(
n_point = 20, n_obs1 = 4, n_obs2 = 5, c_val = 10,
delta_shape = "constant", distrib = "normal"
)
MatX <- simu_data$mat_sample1
MatY <- simu_data$mat_sample2
res <- permut_pval(
MatX, MatY, n_perm = 100, stat = c("mo", "med", "wmw", "hkr", "cff"),
verbose = TRUE)
res
#> $mo
#> [1] 0.01980198
#>
#> $med
#> [1] 0.01980198
#>
#> $wmw
#> [1] 0.01980198
#>
#> $hkr
#> T1 T2
#> 0.02970297 0.02970297
#>
#> $cff
#> [1] 0.01980198
#>