# generate test data from the Lorenz system
testdata <- nonlinearTseries::lorenz()
testdata <- tibble::as_tibble(testdata)
# fit an NVAR model for the Lorenz system
t1 <- NVAR(data = testdata, vars = c("x", "y", "z"), s = 2, k = 2, p = 2, alpha = 1e-3)
# simulate the NVAR model
t1_sim <- sim_NVAR(t1, length = 5000)
# (also see README for the plots of the results and the comparison with the true model)
Run the code above in your browser using DataLab