coef.rjMCMC {fkbma} | R Documentation |
Extract Posterior Mean Coefficients from rjMCMC Results
Description
This function extracts the posterior means of the intercept, exposure parameters, and binary parameters from the results of an rjMCMC model.
Usage
## S3 method for class 'rjMCMC'
coef(object, ...)
Arguments
object |
An object of class rjMCMC containing the output from the
|
... |
Additional arguments to be passed to other methods or functions. |
Value
A numeric vector containing the posterior mean of the intercept, exposure, and binary parameters.
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")
coef(results)