Description Usage Arguments Details Value References See Also Examples
View source: R/621.Poster_Predictive.R
The Predicted probability - Bayesian approach
1 | probPRE(n, m, a1, a2)
|
n |
- Number of trials from data |
m |
- Future :Number of trials |
a1 |
- Beta Prior Parameters for Bayesian estimation |
a2 |
- Beta Prior Parameters for Bayesian estimation |
Computes posterior predictive probabilities for the required size of number of
trials m
from the given number of trials n
for the given parameters for Beta prior
distribution
A matrix of probability values between [0,1]
predicted_probability |
- The predicted probability |
0:n |
The number of columns based on the value of n |
[1] 2002 Gelman A, Carlin JB, Stern HS and Dunson DB Bayesian Data Analysis, Chapman & Hall/CRC
Other Miscellaneous functions for Bayesian method: empericalBAx
,
empericalBA
, probPOSx
,
probPOS
, probPREx
1 2 | n=10; m=5; a1=0.5; a2=0.5
probPRE(n,m,a1,a2)
|
xnew 0 1 2 3 4 5
[1,] 0 0.8199027535 0.5371776661 0.33822297 0.20293378 0.11470170 0.06008185
[2,] 1 0.1413625437 0.2984320367 0.33822297 0.30881228 0.24578937 0.17392113
[3,] 2 0.0314138986 0.1193728147 0.20587485 0.26469624 0.28459821 0.26599702
[4,] 3 0.0062827797 0.0363308566 0.08823208 0.15324519 0.21763393 0.26599702
[5,] 4 0.0009560752 0.0077851836 0.02554087 0.05859375 0.10881696 0.17392113
[6,] 5 0.0000819493 0.0009014423 0.00390625 0.01171875 0.02845982 0.06008185
6 7 8 9 10
[1,] 0.02845982 0.01171875 0.00390625 0.0009014423 0.0000819493
[2,] 0.10881696 0.05859375 0.02554087 0.0077851836 0.0009560752
[3,] 0.21763393 0.15324519 0.08823208 0.0363308566 0.0062827797
[4,] 0.28459821 0.26469624 0.20587485 0.1193728147 0.0314138986
[5,] 0.24578937 0.30881228 0.33822297 0.2984320367 0.1413625437
[6,] 0.11470170 0.20293378 0.33822297 0.5371776661 0.8199027535
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.