Description Usage Arguments Details Examples
Plot the columns of one matrix against the columns of anothor. These matrices
come from different functions, including binombeta,
nbinombeta, poisgamma, gamgam and
normnorm.
1 2 3 4  | 
x, y | 
 vectors or matrices of data for plotting. The number of row should match. If one of them are missing, the other is taken as y and an x vector of 1:n is used. Missing values (NAs) are allowed.  | 
leg_pos | 
 a character vector of legend place.  | 
which | 
 if matrices are from   | 
prob | 
 the probability level.  | 
... | 
 other arguments from   | 
The 1 plot shows the prior and posterior distribution of mu. The 2 plot shows the prior and posterior distribution of tau. The 3 plot shows the prior contour with probabilites. The 4 plot shows the posterior contour with probabilites. The 5 plot shows the prior and posterior contours with probabilites together.
1 2 3 4 5 6 7 8 9 10 11 12 13  | ## Get the posterior distribution with Gamma-Gamma model and plot.
y <- rgamma(10, shape = 3)
ex <- gamgam(y, a = 3, 4, 1)
plot(ex, leg_pos = "center" , box.lty=0)
## Obtain the posterior distribution with Normal-Gamma model,
## assuming both mu and sigma are unknown.
x <- rnorm(100, mean = 1, sd = 0.5)
ex <- normnorm(y, m = 2, s = 1, a = 1, b = 2)
## show the fourth and fifth plot
plot(ex, which = 4, main = "Posterior Contour",
           xlim = c(-3,3), ylim = c(0,3))
plot(ex, which = 5, main = "Prior and Posterior Contour")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.