BIest {PROreg}R Documentation

Estimation of the parameters of a binomial distribution with optional dispersion parameter.

Description

BIest function estimates the probability parameter of a binomial distribution for the given data and number of trials. It is possible to include a dispersion parameter in the binomial distribution and get the estimation by the method of moments or maximum quasi-likelihood approach. This function also returns the standard deviation of the estimated probability parameter and the upper and lower bounds of the 95% confidence interval.

Usage

BIest(y,m,disp=FALSE,method="MM")

Arguments

y

response variable wich follows a binomial distribution.

m

number of trials in each binomial observation.

disp

dispersion parameter of the binomial distribution. If phi=FALSE, then the binomial distribution without dispersion parameter will be considered for estimation. Default FALSE.

method

the method used for estimating the parameters, "MM" for the method of moments and "MLE" for maximum quasi-likelihood. Default "MM".

Details

This function performs the estimation of the parameters involved in a binomial distribution for a given data.

The estimation of the probability parameter is done by either maximum likelihood approach or method of moments due to the fact that both approaches give the same estimation,

p=sum(y)/(m*n),

where m is the number of trials and n is the number of observations.

If the dispersion parameter is included in the model, BIest function performs its estimation by the method of moments or maximum quasi-likelihood methodology. The method of moments is based on the variance equation of a binomial distribution with dispersion parameter

Var[y]=phi*mp(1-p).

The maximum quasi-likelihood approach is based on the quadratic approximation of the log-likelihood function of a binomial distribution with dispersion parameter, where the unknown term involving phi is estimated with the deviance of the model.

The standard deviation of the estimated probability parameter is calculated by the Fisher information, i.e., the negative of the second derivative of the log-likelihood (log-quasi-likelihood) function.

Value

BIest returns an object of class "BIest".

p

estimation of the probability parameter. Both estimating approaches, the method of moments and the maximum likelihood estimation, perform the same estimation.

pVar

the variance of the estimated probability parameter.

pIC.low

the lower bound of the 95% confidence interval of the estimated probability parameter.

pIC.up

the upper bound of the 95% confidence interval of the estimated probability parameter.

phi

if the disp option is TRUE, it returns the estimated value of the dispersion parameter. Default FALSE.

m

number of trials in each binomial observation.

balanced

if the data is balanced it returns "yes", otherwise "no".

method

the used methodology for performing the estimation of the parameters.

Author(s)

J. Najera-Zuloaga

D.-J. Lee

I. Arostegui

References

Pawitan Y. (2001): In All Likelihood: Statistical Modelling and Inference Using Likelihood, Oxford University Press

See Also

The rBI and dBI functions of package HRQoL. The functions perform simulations and estimate the density of a binomial distribution with optional dispersion parameter for a given set of parameters.

Examples

set.seed(9)
# We simulate the binomial data with some fixed parameters and
# then try to reach the same estimations.
m <- 10   
k <- 100
p <- 0.654
y <- rBI(k,m,p) #Simulations

# without dispersion parameter
BIest(y,m)

# with dispersion parameter
# estimation by method of moments.
BIest(y,m,disp=TRUE,method="MM")
# estimation by maximum quasi-likelihood.
BIest(y,m,disp=TRUE,method="MLE")

[Package PROreg version 1.3 Index]