credint {fkbma} | R Documentation |
Credible Intervals for rjMCMC Results
Description
This function calculates the posterior mean and credible intervals for parameters from the rjMCMC results, including both intercept/exposure parameters and binary parameters. The credible intervals are computed based on the specified confidence level.
Usage
credint(results, level = 0.95)
Arguments
results |
An object of class rjMCMC containing the output from the |
level |
The level for the credible intervals (default is 0.95). |
Value
A data frame with estimates, lower, and upper bounds of the credible intervals.
Examples
# Example dataset
data("simulated_data")
candsplinevars <- c("X_1")
candbinaryvars <- paste0("Z_", 1:5)
candinter <- c(candsplinevars, candbinaryvars)
results <- rjMCMC(simulated_data, candsplinevars, candbinaryvars, candinter,
outcome = "Y", factor_var = "trt")
credint(results)
[Package fkbma version 0.2.0 Index]