triplot.normal.knownvariance {blmeco} | R Documentation |
The function draws a normal prior distribution, the data and the posterior distribution in one plot. It serves as a tool to explore the influence of different prior on a hypotehtical set of normally distributed data
triplot.normal.knownvariance(theta.data, variance.known, n, prior.theta, prior.variance,
legend = TRUE, ylim = c(0, max(yposterior)), legend.bty="n")
theta.data |
mean of the data |
variance.known |
known variance |
n |
sample size |
prior.theta |
mean of the prior distribution |
prior.variance |
variance of the prior distribution |
legend |
logical, if TRUE (default) a legend is drawn |
ylim |
ylim of the plot |
legend.bty |
box type of legend |
Fraenzi Korner-Nievergelt
Gelman, A., J. B. Carlin, H. S. Stern and D. B. Rubin (2004). Bayesian Data Analysis. New York, Chapman & Hall/CRC.
triplot.normal.knownvariance(theta.data=10, n=20, variance.known=5,
prior.theta=0, prior.variance=100)