Description Usage Arguments Value Author(s) Examples
Computes the posterior distribution for an arbitrary two parameter distribution for a discrete prior distribution.
1 | discrete.bayes.2(df,prior,y=NULL,...)
|
df |
name of the function defining the sampling density of two parameters |
prior |
matrix defining the prior density; the row names and column names of the matrix define respectively the values of parameter 1 and values of parameter 2 and the entries of the matrix give the prior probabilities |
y |
y is a matrix of data values, where each row corresponds to a single observation |
... |
any further fixed parameter values used in the sampling density function |
prob |
matrix of posterior probabilities |
pred |
scalar with prior predictive probability |
Jim Albert
1 2 3 4 5 6 |
$prob
0.1 0.2 0.3 0.4 0.5 0.6
0.1 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568
0.2 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568
0.3 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568
0.4 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568
0.5 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568
0.6 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568
0.7 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568
0.8 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568
0.9 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568 0.01234568
0.7 0.8 0.9
0.1 0.01234568 0.01234568 0.01234568
0.2 0.01234568 0.01234568 0.01234568
0.3 0.01234568 0.01234568 0.01234568
0.4 0.01234568 0.01234568 0.01234568
0.5 0.01234568 0.01234568 0.01234568
0.6 0.01234568 0.01234568 0.01234568
0.7 0.01234568 0.01234568 0.01234568
0.8 0.01234568 0.01234568 0.01234568
0.9 0.01234568 0.01234568 0.01234568
$pred
[1] 1
attr(,"class")
[1] "bayes2"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.