#Create a sample dataset
df1 <- data.frame("gender" = sample(c("female", "male"), 100, TRUE, c(1 / 3, 2 / 3)),
"age" = sample(c("18-35", "36-50", ">50"), 100, TRUE),
"bloodpressure" = sample(c("normal", "high", "hyper"), 100, TRUE),
stringsAsFactors = TRUE)
res1 <- ECADE(data = df1, all.cat = TRUE,
alloc.function = "Efron", rho = 0.85)
summary_covadap(res1)
res2 <- ECADE.sim(data = df1, cov = NULL, n = NULL, all.cat = TRUE,
alloc.function = "Efron", rho = 0.85, nrep = 100)
summary_covadap(res2)
Run the code above in your browser using DataLab