DbdaDensPlot2: Density plot of posterior distribution of a given model...

Description Usage Arguments See Also Examples

View source: R/DbdaDensPlot2.R

Description

Density plot of posterior distribution of a given model parameter.

Usage

1
2
DbdaDensPlot2( codaObject , parName=varnames(codaObject)[1] , plColors=NULL, 
xlab='Param. Value', main=paste('Posterior distribution of\n', xlab) )

Arguments

codaObject

A coda::mcmc.list object.

parName

The parameter name.

plColors

Colors to be used for plotting.

xlab

xlabel.

main

Title of the figure.

See Also

best.robust_t_test,best.student_t

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(lxctk)
library(coda)
library(rstan)

x <- rt(1000, df=1)
fit <- best.student_t(x, stanDso)
codaObject <- stanfit2mcmc.list(fit)
#diag.mcmc(codaObject)
DbdaDensPlot2(codaObject)


data('x')
##fit <- best.student_t(x, stanDso) ## The above error will be generated
fit <- best.student_t(x, stanDso, unifLo=0, unifHi=.Machine$double.xmax) ## No errors
codaObject <- stanfit2mcmc.list(fit)
#diag.mcmc(codaObject)
DbdaDensPlot2(codaObject)

lixiangchun/lxctk documentation built on May 21, 2019, 6:44 a.m.