# \donttest{
X <- X_dgp3
Y <- Y_dgp3
# Set estimations for group factors and its loadings, and group membership to the true value
lambda_group <- lambda_group_true_dgp3
factor_group <- factor_group_true_dgp3
g <- g_true_dgp3
# There are no common factors to be estimated -> but needs placeholder
lambda <- matrix(0, nrow = 1, ncol = 300)
comfactor <- matrix(0, nrow = 1, ncol = 30)
#
# Choose how coefficients of the observable variables are estimated
method_estimate_beta <- "individual"
method_estimate_factors <- "macro"
beta_est <- estimate_beta(
Y, X, NA, g, lambda_group, factor_group,
lambda, comfactor,
S = 3, k = 0, kg = c(3, 3, 3),
vars_est = 3,
robust = TRUE
)[[1]]
# }
Run the code above in your browser using DataLab