Simulation of trajectories from two samples diverging by a delta function
simul_data.Rd
Simulate n_obs1
trajectories of length n_point
in the first sample and
n_obs2
trajectories of length n_point
in the second sample.
Usage
simul_data(
n_point,
n_obs1,
n_obs2,
c_val = 0,
delta_shape = "constant",
distrib = "normal",
max_iter = 10000
)
Arguments
- n_point
integer value, number of points in the trajectory.
- n_obs1
integer value, number of trajectories in the first sample.
- n_obs2
integer value, number of trajectories in the second sample.
- c_val
numeric value, level of divergence between the two samples.
- delta_shape
character string, shape of the divergence between the two samples, among
"constant"
,"linear"
,"quadratic"
.- distrib
character string, type of probability distribution used to simulate the data among
"normal"
,"cauchy"
,"dexp"
,"student"
.- max_iter
integer, maximum number of iteration for the iterative simulation process.
Value
A list with the following elements
mat_sample1
: numeric matrix of dimensionn_point x n_obs1
containingn_obs1
trajectories (in columns) of sizen_point
(in rows) corresponding to sample 1.mat_sample2
: numeric matrix of dimensionn_point x n_obs2
containingn_obs2
trajectories (in columns) of sizen_point
(in rows) corresponding to sample 2.
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
simu_data <- simul_data(
n_point = 100, n_obs1 = 50, n_obs2 = 75, c_val = 10,
delta_shape = "constant", distrib = "normal"
)
str(simu_data)
#> List of 5
#> $ mat_sample1: num [1:100, 1:50] 10 10.1 10.1 10.1 10.2 ...
#> $ mat_sample2: num [1:100, 1:75] 0 -0.0297 -0.059 -0.0874 -0.1148 ...
#> $ c_val : num 10
#> $ distrib : chr "normal"
#> $ delta_shape: chr "constant"