Skip to contents

The Horváth-Kokoszka-Reeder statistics defined in Chakraborty & Chaudhuri (2015) (and noted HKR1 and HKR2 in Smida et al 2022) are computed to compare two sets of functional trajectories.

Usage

stat_hkr(MatX, MatY)

Arguments

MatX

numeric matrix of dimension n_point x n containing n trajectories (in columns) of size n_point (in rows).

MatY

numeric matrix of dimension n_point x m containing m trajectories (in columns) of size n_point (in rows).

Value

A list with the following elements

  • T1: numeric value corresponding to the HKR1 statistic value

  • T2: numeric value corresponding to the HKR2 statistic value

  • eigenval: numeric vector of eigen values from the empirical pooled covariance matrix of MatX and MatY (see Smida et al, 2022, for more details)

References

Horváth, L., Kokoszka, P., & Reeder, R. (2013). Estimation of the mean of functional time series and a two-sample problem. Journal of the Royal Statistical Society. Series B (Statistical Methodology), 75(1), 103–122. doi:10.1111/j.1467-9868.2012.01032.x

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

Author

Zaineb Smida, Ghislain DURIF, Lionel Cucala

Examples

simu_data <- simul_data(
    n_point = 100, n_obs1 = 50, n_obs2 = 75, c_val = 10, 
    delta_shape = "constant", distrib = "normal"
)

MatX <- simu_data$mat_sample1
MatY <- simu_data$mat_sample2

stat_hkr(MatX, MatY)
#> $T1
#> [1] 1921769
#> 
#> $T2
#> [1] 295759.4
#> 
#> $eigenval
#>  [1] 4.198262e+01 4.694360e+00 1.654702e+00 7.278318e-01 2.516286e-01
#>  [6] 1.593366e-01 1.045730e-01 4.435947e-02 2.597700e-02 1.895018e-02
#> [11] 4.853822e-03 3.015245e-03 1.600908e-03 8.462364e-04 2.923866e-04
#> [16] 1.369380e-06
#>