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))
)

Arguments

theta

A double value of the vector representing the parameter vector for the model (the vector is length 8). The first four parameters are those for the first signal (root) and represent respectively: \(\phi\) (the range parameter), \(\psi\) (the intensity parameter of the causal impact of the second signal on the first), \(\gamma\) (the parameter representing time of maximal impact of the second signal on the first), \(\sigma^2\) (the variance parameter of the first signal). The following four parameters of the vector theta are the same but for the second signal.

times

A double value of the vector containing the irregular time points (in the same unit) at which measurements are to be simulated.

burn_length

An integer value representing how many measurements to simulate for the burn-in phase before taking the following values as the actual simulated time series (defaults to 3*length(times)).

burn_step

A double value representing the fixed regular time points to use for the burn-in phase of the simulation (defaults to median(diff(times))).

Value

A list containing the following objects:

root

The simulated values for the first signal (root)

shoot

The simulated values for the second signal (shoot)

Author

Roberto Molinari and Stephane Guerrier

Examples

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 #>