trplot: Plots a traceplot for the different MCMC chains of a 'micore'...

Description Usage Arguments Value Examples

View source: R/methods.R

Description

Plots a traceplot for the different MCMC chains of a micore object for a specific parameter.

Usage

1
2
3
4
5
6
7
8
trplot(
  obj,
  par = c("A", "B", "Psi", "eta", "gamma", "Gamma"),
  ind,
  xlab = NULL,
  ylab = NULL,
  ...
)

Arguments

obj

An object of class micore

par

Character object specifying which parameter to make a traceplot for.

ind

For matrix parameters, a 2-dimensional vector specifying the element of the parameter matrix to make the traceplot for.

xlab

Label for the x-axis.

ylab

Label for the y-axis.

...

Other arguments passed to plot.

Value

Makes a traceplot for the specified parameter.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
n <- 50
p <- 5
X <- cbind(1, rnorm(n))
counts <- matrix(0, n, p+1)
for (i in 1:n) {
  counts[i,] <- rmultinom(1, size=100, prob=rep(1,p+1))
}

library(micore)
mc.fit <- micore(counts, X, n.samp=100, n.burn=100, n.chain=2)

trplot(mc.fit, par="B", ind=c(1,2))

kevinmcgregor/micore documentation built on June 9, 2021, 10:29 p.m.