# \donttest{
library(IVPP)
# Generate the network
net_ls <- gen_tsGVAR(n_node = 6,
p_rewire_temp = 0.5,
p_rewire_cont = 0.5,
n_persons = 2)
# Generate the data
data <- sim_tsGVAR(beta_base_ls = net_ls$beta,
kappa_base_ls = net_ls$kappa,
# n_person = 2,
n_time = 100)
# global test on temporal
omnibus_temp <- IVPP_tsgvar(data,
vars = paste0("V",1:6),
idvar = "id",
g_test_net = "temporal",
net_type = "sparse",
partial_prune = FALSE,
ncores = 1)
# global test on cont
omnibus_cont <- IVPP_tsgvar(data,
vars = paste0("V",1:6),
idvar = "id",
g_test_net = "contemporaneous",
net_type = "sparse",
partial_prune = FALSE,
ncores = 1)
# partial prune on both networks
pp_both <- IVPP_tsgvar(data,
vars = paste0("V",1:6),
idvar = "id",
global = FALSE,
net_type = "sparse",
partial_prune = TRUE,
prune_net = "both",
ncores = 1)
# }
Run the code above in your browser using DataLab