Home > Software engineering >  what packages do I need to install to draw traceplot in R
what packages do I need to install to draw traceplot in R

Time:10-10

I need to draw a traceplot in R but I don't have a package that has "traceplot" what pacakages do I need to install?

CodePudding user response:

You can use library (bpnreg)

F.e.:

library(bpnreg)
fit.Motor <- bpnr(pred.I = Phaserad ~ 1   Cond, data = Motor,
its = 100, burn = 10, n.lag = 3)
traceplot(fit.Motor, parameter = "beta1")

enter image description here

If you like an aestetics of ggplot2 - look the library(ggmcmc).

See examples there:

https://cran.r-project.org/web/packages/ggmcmc/vignettes/using_ggmcmc.html

Good luck!

CodePudding user response:

Try coda::traceplot() or plotMCMC::plotTrace(). (coda is probably the "canonical", i.e. the oldest/best-established/most-used, package for this application.)

  •  Tags:  
  • r
  • Related