sim_dataset.Rd
Generate the simulations of the expert_matrix
(matrix
)
A g * P matrix. Logit regression coefficients.
(matrix
)
An N * P covariate matrix, where N is sample size. The first column MUST be 1
for an intercept term.
(ExpertMatrix
)
A D*g expert matrix.
(matrix
)
A D * g string matrix, representing the name of expert functions.
(matrix
)
A D * g matrix of lists, representing the parameters of expert functions.
A N*1 vector that contain the exposure value for each column in expert_matrix
A N*D simulation matrix of expert_matrix.
#alpha = matrix(runif(20,-1,1), nrow = 4)
#x = matrix(runif(35, -1, 1), nrow = 7)
#params = matrix(list( list(meanlog = 100, sdlog = 2), list(meanlog = 100, sdlog = 2),
# list(meanlog = 333, sdlog = 1), list(meanlog = 533, sdlog = 1),
# list(meanlog = 1, sdlog = 2), list(meanlog = 1, sdlog = 2),
# list(meanlog = 3, sdlog = 1), list(meanlog = 5, sdlog = 1)),
# nrow = 2, byrow = T)
# expert_names = matrix( c("lognormal", "lognormal", "lognormal", "lognormal",
# "lognormal", "lognormal", "lognormal", "lognormal"), nrow = 2, byrow = T)
#expert_matrix = ExpertMatrix$new(expert_matrix = expert_names, expert_params_matrix = params)
#for(expert in expert_matrix$expert_matrix) {
# expert$set_penalty_params(c(1,1,1))
# expert$initialize_penalty()
#}
#exposure_list = c(1,2,1,2,2,2,1)
#sim_dataset(alpha, x, expert_matrix, exposure = exposure_list)