empericalBA: The empirical Bayesian approach for Beta-Binomial model

Description Usage Arguments Details Value References See Also Examples

View source: R/611.Empirical.R

Description

The empirical Bayesian approach for Beta-Binomial model

Usage

1
empericalBA(n, alp, sL, sU)

Arguments

n

- Number of trials

alp

- Alpha value (significance level required)

sL

- Lower support for MLE optimization

sU

- Upper support for MLE optimization

Details

Highest Probability Density (HPD) and two tailed intervals are provided for all x = 0, 1, 2 ..n based on empirical Bayesian approach for Beta-Binomial model. Lower and Upper support values are needed to obtain the MLE of marginal likelihood for prior parameters.

Value

A dataframe with

x

- Number of successes (positive samples)

pomean

- Posterior mean

LBAQ

- Lower limits of Quantile based intervals

UBAQ

- Upper limits of Quantile based intervals

LBAH

- Lower limits of HPD intervals

UBAH

- Upper limits of HPD intervals

References

[1] 1998 Lehmann EL and Casella G Theory of Point Estimation, 2nd ed Springer, New York

See Also

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

Examples

1
2
3
4
sL=runif(1,0,2)				#Lower and upper of Support for MLE optimization
sU=runif(1,sL,10)
n= 5; alp=0.05
empericalBA(n,alp,sL,sU) 

Example output

  x pomean  LEBAQ  UEBAQ  LEBAH  UEBAH
1 0 0.1383 0.0050 0.4350 0.0000 0.3726
2 1 0.2669 0.0419 0.6029 0.0176 0.5534
3 2 0.4315 0.1384 0.7558 0.1276 0.7432
4 3 0.5685 0.2442 0.8616 0.2568 0.8724
5 4 0.7331 0.3971 0.9581 0.4466 0.9824
6 5 0.8617 0.5650 0.9950 0.6274 1.0000

proportion documentation built on May 1, 2019, 7:54 p.m.