plot.bayesm.mat
is an S3 method to plot arrays of MCMC draws. The columns in the array correspond to parameters and the rows to MCMC draws.
# S3 method for bayesm.mat
plot(x,names,burnin,tvalues,TRACEPLOT,DEN,INT,CHECK_NDRAWS, ...)
An object of either S3 class, bayesm.mat
, or S3 class, mcmc
optional character vector of names for coefficients
number of draws to discard for burn-in (def: \(0.1*nrow(X))\)
vector of true values
logical, TRUE
provide sequence plots of draws and acfs (def: TRUE
)
logical, TRUE
use density scale on histograms (def: TRUE
)
logical, TRUE
put various intervals and points on graph (def: TRUE
)
logical, TRUE
check that there are at least 100 draws (def: TRUE
)
standard graphics parameters
Peter Rossi, Anderson School, UCLA, perossichi@gmail.com.
Typically, plot.bayesm.mat
will be invoked by a call to the generic plot function as in plot(object)
where object is of class bayesm.mat
. All of the bayesm
MCMC routines return draws in this class (see example below). One can also simply invoke plot.bayesm.mat
on any valid 2-dim array as in plot.bayesm.mat(betadraws)
.
plot.bayesm.mat
paints (by default) on the histogram:
green "[]" delimiting 95% Bayesian Credibility Interval
yellow "()" showing +/- 2 numerical standard errors
red "|" showing posterior mean
plot.bayesm.mat
is also exported for use as a standard function, as in plot.bayesm.mat(matrix)
if (FALSE) out=runiregGibbs(Data,Prior,Mcmc); plot(out$betadraw)
Run the code above in your browser using DataLab