Summary function to generate result table from bayesmsm
Source:R/summary_bayesmsm.R
summary_bayesmsm.Rd
This function generates a ready to use result table that contents the estimated APO and ATE and their 95% credible intervals
Examples
# Continuous outcome
testdata <- read.csv(system.file("extdata",
"continuous_outcome_data.csv",
package = "bayesmsm"))
model <- bayesmsm(ymodel = y ~ a_1+a_2,
nvisit = 2,
reference = c(rep(0,2)),
comparator = c(rep(1,2)),
treatment_effect_type = "sq",
family = "gaussian",
data = testdata,
wmean = rep(1, 1000),
nboot = 10,
optim_method = "BFGS",
seed = 890123,
parallel = FALSE)
summary_bayesmsm(model)
#> mean sd 2.5% 97.5%
#> Reference 2.3302234 0 2.3302234 2.3302234
#> Comparator -0.8408446 0 -0.8408446 -0.8408446
#> RD -3.1710680 0 -3.1710680 -3.1710680