ExtractEsts function

Extract summary statistics

Extract summary statistics

Obtain summary statistics of each parameter from the BKMR fit

ExtractEsts(fit, q = c(0.025, 0.25, 0.5, 0.75, 0.975), sel = NULL)

Arguments

  • fit: An object containing the results returned by a the kmbayes function
  • q: vector of quantiles
  • sel: logical expression indicating samples to keep; defaults to keeping the second half of all samples

Returns

a list where each component is a data frame containing the summary statistics of the posterior distribution of one of the parameters (or vector of parameters) being estimated

Examples

## First generate dataset set.seed(111) dat <- SimData(n = 50, M = 4) y <- dat$y Z <- dat$Z X <- dat$X ## Fit model with component-wise variable selection ## Using only 100 iterations to make example run quickly ## Typically should use a large number of iterations for inference set.seed(111) fitkm <- kmbayes(y = y, Z = Z, X = X, iter = 100, verbose = FALSE, varsel = TRUE) ests <- ExtractEsts(fitkm) names(ests) ests$beta
  • Maintainer: Jennifer F. Bobb
  • License: GPL-2
  • Last published: 2022-03-28