simulate data from a second order random walk

simulate_iid(sigma = NULL, tau = NULL, n_sim = 1000)

Arguments

sigma

the standard deviation of the random intercept

tau

the precision of the random intercept

n_sim

the number of simulations

Value

a data.frame with simulated time series from the random walk

See also

Examples

set.seed(20181202) x <- simulate_iid(sigma = 0.25) head(x)
#> [1] 0.2755105 0.5170407 -0.2154170 0.2174818 -0.1355100 -0.6244620