Learn R Programming

proportion (version 2.0.0)

probPREx: The Predicted probability - Bayesian approach

Description

The Predicted probability - Bayesian approach

Usage

probPREx(x, n, xnew, m, a1, a2)

Arguments

x
- Number of successes
n
- Number of trials from data
xnew
- Required size of number of success
m
- Future :Number of trials
a1
- Beta Prior Parameters for Bayesian estimation
a2
- Beta Prior Parameters for Bayesian estimation

Value

A dataframe with x,n,xnew,m,preprb
x
Number of successes
n
Number of trials
xnew
Required size of number of success
m
Future - success, trails
preprb
The predicted probability

Details

Computes posterior predictive probability for the required size of number of successes for xnew of m trials from the given number of successes x of n trials for the given parameters for Beta prior distribution

References

[1] 2002 Gelman A, Carlin JB, Stern HS and Dunson DB Bayesian Data Analysis, Chapman & Hall/CRC

See Also

Other Miscellaneous functions for Bayesian method: empericalBAx, empericalBA, probPOSx, probPOS, probPRE

Examples

Run this code
x=0; n=1; xnew=10; m=10; a1=1; a2=1
probPREx(x,n,xnew,m,a1,a2)

Run the code above in your browser using DataLab