gMLE.bb: Beta-Binomial Parameter Estimation

Description Usage Arguments Value Author(s) References Examples

Description

Computes type-II Maximum likelihood estimates \hat{α} and \hat{β} for Beta prior g\simBeta(α,β).

Usage

1
2
gMLE.bb(success, trials, start = NULL, optim.method = "default", 
        lower = 0, upper = Inf)

Arguments

success

Vector containing the number of successes.

trials

Vector containing the total number of trials that correspond to the successes.

start

initial parameters; default is NULL which allows function to determine MoM estimates as initial parameters.

optim.method

optimization method in optim()stats.

lower

lower bound for parameters; default is 0.

upper

upper bound for parameters; default is infinity.

Value

estimate

MLE estimate for beta parameters.

convergence

Convergence code from optim(); 0 means convergence.

loglik

Loglikelihood that corresponds with MLE estimated parameters.

initial

Initial parameters, either user-defined or determined from method of moments.

hessian

Estimated Hessian matrix at the given solution.

Author(s)

Aleksandar Bradic

References

https://github.com/SupplyFrame/EmpiricalBayesR/blob/master/EmpiricalBayesEstimation.R

Examples

1
2
3
4
5
6
7
data(rat)
### MLE estimate of alpha and beta
rat.mle <- gMLE.bb(rat$y, rat$N)$estimate
rat.mle
### MoM estimate of alpha and beta
rat.mom <- gMLE.bb(rat$y, rat$N)$initial
rat.mom

BayesGOF documentation built on May 2, 2019, 8:57 a.m.