TracePlot function

Trace plot

Trace plot

TracePlot( fit, par, comp = 1, sel = NULL, main = "", xlab = "iteration", ylab = "parameter value", ... )

Arguments

  • fit: An object containing the results returned by a the kmbayes function
  • par: which parameter to plot
  • comp: which component of the parameter vector to plot
  • sel: logical expression indicating samples to keep; defaults to keeping the second half of all samples
  • main: title
  • xlab: x axis label
  • ylab: y axis label
  • ...: other arguments to pass onto the plotting function

Returns

No return value, generates plot

Details

For guided examples, go to https://jenfb.github.io/bkmr/overview.html

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) TracePlot(fit = fitkm, par = "beta") TracePlot(fit = fitkm, par = "sigsq.eps") TracePlot(fit = fitkm, par = "r", comp = 1)
  • Maintainer: Jennifer F. Bobb
  • License: GPL-2
  • Last published: 2022-03-28