piv_plot: Plotting outputs from pivotal relabelling

View source: R/plot.R

piv_plotR Documentation

Plotting outputs from pivotal relabelling

Description

Plot and visualize MCMC outputs and posterior relabelled chains/estimates.

Usage

piv_plot(
  y,
  mcmc,
  rel_est,
  par = c("mean", "sd", "weight", "all"),
  type = c("chains", "hist")
)

Arguments

y

Data vector or matrix.

mcmc

The ouptut of the raw MCMC sampling, as provided by piv_MCMC.

rel_est

Pivotal estimates as provided by piv_rel.

par

The parameters for which estimates are displayed. Choose among: "mean", "sd", "weight" and "all".

type

Type of plots required. Choose among: "chains", "hist".

Author(s)

Leonardo Egidi legidi@units.it

Examples


# Fishery data
## Not run: 
library(bayesmix)
data(fish)
y <- fish[,1]
N <- length(y)
k <- 5
nMC <- 5000
res <- piv_MCMC(y = y, k = k, nMC = nMC)
rel <- piv_rel(mcmc=res, nMC = nMC)
piv_plot(y, res, rel, "chains")
piv_plot(y, res, rel, "estimates")
piv_plot(y, res, rel, "hist")

## End(Not run)


pivmet documentation built on March 7, 2023, 6:34 p.m.