plotPost: Plot posterior distribution of a given parameter

Description Usage Arguments See Also Examples

View source: R/DBDA2E-utilities.R

Description

Plot posterior distribution of a given parameter.

Usage

1
2
3
4
5
6
plotPost( paramSampleVec , cenTend=c("mode","median","mean")[1] , 
	compVal=NULL, ROPE=NULL, credMass=0.95, HDItextPlace=0.7, 
	xlab=NULL , xlim=NULL , yaxt=NULL , ylab=NULL , 
	main=NULL , cex=NULL , cex.lab=NULL ,
	col=NULL , border=NULL , showCurve=FALSE , breaks=NULL , 
	... ) 

Arguments

paramSampleVec

A vector of sample associated with a parameter estimated by MCMC.

See Also

best.robust_t_test,stan_model,HDIofMCMC

Examples

1
2
3
4
5
6
7
8
9
## Not Run
stanFit <- best.robust_t_test(...) ## A stanfit object
codaFit <- stanfit2mcmc.list(stanFit) ## convert stanfit object to coda object

plotPost(codaFit[,'mu[1]'],"mean",xlab=expression(mu[tumor]), main='TERT')

plotPost(codaFit[,'mu_diff'][[1]],"mean",xlab=expression(mu[tumor]), main='TERT')

plotPost(codaFit[,'mu_diff'],"mean",xlab=expression(mu[tumor]), main='TERT')

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