# NOT RUN {
# simulate DGP
set.seed(1)
t <- 10; n = 5; p = 20; size.groups = 4
index <- ceiling(1:p / size.groups)
X <- matrix(rnorm(n * t * p), ncol = p, nrow = n*t)
beta <- c(5,4,3,2,1)
y <- X[,1:5] %*% beta + 5*rnorm(n*t)
entity_indices <- sort(rep(1:n,times=t-1))
panel_sgl(X = X, Z = NULL, y = y, index = index,
entity_indices = entity_indices, gamma_w = 1,
regress_choice = "fe", method_choice = "initial",
num_cores = 2, verbose = FALSE)
# }
Run the code above in your browser using DataLab