phiWt: Binomial dispersion parameter.

View source: R/phiWt.r

phiWtR Documentation

Binomial dispersion parameter.

Description

MME estimate of dispersion parameter phi.

Usage

phiWt(fit, subset.factor = NULL, fit.only = TRUE, show.warns = FALSE)

Arguments

fit

A glm object.

subset.factor

Factor for estimating phi by subset. Will be converted to a factor if it is not a factor.

fit.only

Return only the new fit? If FALSE, also returns the weights and phi estimates.

show.warns

Show warnings

Details

Estimates binomial dispersion parameter \phi by the method of moments. Refits the model, weighting the observations by 1/\phi. Uses quasibinomial family in glm().

Value

A list with the following elements. fit: the new model fit, updated by the estimated weights weights: vector of weights phi: vector of phi estimates

Author(s)

PF-package

References

Wedderburn RWM, 1974. Quasi-likelihood functions, generalized linear models, and the Gauss-Newton method. Biometrika 61:439-447.

See Also

tauWt, RRor.

Examples

birdm.fit <- glm(cbind(y, n - y) ~ tx-1, binomial, birdm)
RRor(phiWt(birdm.fit))
#
# 95% t intervals on 4 df
#
# PF
#     PF     LL     UL
#  0.479 -0.537  0.823
#
#       mu.hat   LL    UL
# txcon  0.768 0.95 0.367
# txvac  0.400 0.78 0.111
#

ABS-dev/PF documentation built on Sept. 19, 2024, 10:31 a.m.

Related to phiWt in ABS-dev/PF...