if (FALSE) {
library("HelpersMG")
par <- c(a0=10, a1=2, b2=20, b1=-1)
rules <- rbind(data.frame(Name="^a", Min=0, Max="x*2"),
data.frame(Name="^b", Min=0, Max=100))
p <- setPriors(par=par, se=NULL, density="dgamma", rules=rules)
plot(p, parameter="a0")
q <- plot(p, parameter="b1")
q + geom_line(color = "red") + theme_bw() +
theme(plot.margin=unit(c(2,1,1,1), 'cm'),
panel.border = element_blank(),
axis.line.x.bottom = element_line(colour = "black"),
axis.line.y.left = element_line(colour = "black")) +
labs(title="Parameter: b1") + theme(plot.title = element_text(hjust = 0.5))
}
Run the code above in your browser using DataLab