gMLE.bb {BayesGOF}R Documentation

Beta-Binomial Parameter Estimation

Description

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

Usage

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

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

[Package BayesGOF version 5.2 Index]