# NOT RUN {
set.seed(1)
n <- 100 # sample size
p <- 5 # number of covariates
covariates <- matrix(runif(n*p), n, p) # sample matrix of covariates
# let there be three clusters; assign membership randomly
fixed_effects <- sample(c(1,2,3), size = n, replace = TRUE)
# use BCA estimates in matrix X1
setup_X1(funs_Z = "B", covariates = NULL, fixed_effects = NULL)
# use BCA and propensity score estimates in matrix X1
# uses uniform covariates and fixed effects
setup_X1(funs_Z = c("B", "p"), covariates = covariates, fixed_effects = NULL)
# }
Run the code above in your browser using DataLab