This function allows to simulate a bivariate time series sampled at irregular intervals and following a bivariate first-order autoregressive process as described in Heerah et al. (2020).
sim_proc( theta, times, burn_length = 3 * length(times), burn_step = median(diff(times)) )
theta | A |
---|---|
times | A |
burn_length | An |
burn_step | A |
A list
containing the following objects:
The simulated values for the first signal (root)
The simulated values for the second signal (shoot)
Roberto Molinari and Stephane Guerrier
theta <- c(1, 0.99, 10, 0.01, 1, 0, 0, 0.1) times <- c(0, 5, 10, 15, 20, 30, 45, 60, 90, 120) sim_proc(theta, times)#> $root #> [1] -0.2230023294 -0.0083941824 -0.0018004189 -0.0090223409 0.0004754276 #> [6] 0.0876609767 0.0119791437 -0.0251338651 0.0052393123 -0.0010991453 #> #> $shoot #> [1] -0.03613245 0.10718625 0.11211240 -0.11699558 0.10571259 0.04886768 #> [7] -0.14707362 0.13373200 0.13182934 0.06067480 #>