sim_panelGVAR {IVPP}R Documentation

Simulate data for a (multi-group) panelGVAR model

Description

This function generates data for the input (multi-group) panelGVAR model

Usage

sim_panelGVAR(
  temp_base_ls,
  beta_base_ls,
  cont_base_ls,
  n_node,
  n_person = 500,
  n_time = 3,
  n_group,
  mean_trend = 0,
  p_rewire_temp = 0,
  p_rewire_cont = 0,
  save_nets = FALSE
)

Arguments

temp_base_ls

a list of temporal networks of all groups

beta_base_ls

a list of beta matrices of all groups

cont_base_ls

a list of contemporaneous networks of all groups

n_node

number of nodes

n_person

an integer denoting the sample size of each group, default to 500

n_time

number of waves, default to 3

n_group

number of groups

mean_trend

a numeric value indicating the extent of mean trends in data, default to 0

p_rewire_temp

a numeric value between 0 and 1 indicating the extent of non-stationarity in temporal networks, default to 0

p_rewire_cont

a numeric value between 0 and 1 indicating the extent of non-stationarity in contemporaneous networks, default to 0

save_nets

a logical value indicating whether to save the data-generating networks, default to FALSE

Value

A list of temporal and contemporaneous networks

Author(s)

Xinkai Du Maintainer: Xinkai Du xinkai.du.xd@gmail.com

Examples

library(IVPP)
# Generate the network
net_ls <- gen_panelGVAR(n_node = 6,
                        p_rewire_temp = 0.5,
                        p_rewire_cont = 0,
                        n_group = 3)

# Generate the data
data <- sim_panelGVAR(temp_base_ls = net_ls$temporal,
                      cont_base_ls = net_ls$omega_zeta_within,
                      n_person = 500,
                      n_time = 4,
                      n_group = 3,
                      n_node = 6)

[Package IVPP version 1.1.1 Index]