R/plot_trace.R

Defines functions plot_trace

Documented in plot_trace

plot_trace <-
function(parameter,percent.burnin=0,thinning=1,param.name=deparse(substitute(parameter))){
		burnin <- (percent.burnin/100)*length(which(parameter!=0))
		x <- seq(from = burnin,to = length(which(parameter!=0)),by = thinning)
				plot(parameter[x],
					pch=19,
					col=grDevices::adjustcolor(1,alpha.f=0.4),
					main=paste("Trace Plot of",param.name,sep=" "),
					xlab="MCMC sampled generations",
					ylab=param.name
                )
                graphics::abline(h=stats::median(parameter[x]),col="red")	
	}

Try the BEDASSLE package in your browser

Any scripts or data that you put into this service are public.

BEDASSLE documentation built on April 11, 2022, 1:07 a.m.