dfbeta.overglm: Dfbeta statistic for alternatives to the Poisson and Binomial...

View source: R/overglm3.R

dfbeta.overglmR Documentation

Dfbeta statistic for alternatives to the Poisson and Binomial Regression Models under the presence of Overdispersion.

Description

Produces an approximation, better known as the one-step approximation, of the effect on the parameter estimates of deleting each individual in turn. This function also can produce an index plot of the Dfbeta statistic for some parameter chosen via the argument coefs.

Usage

## S3 method for class 'overglm'
dfbeta(model, coefs, identify, ...)

Arguments

model

an object of class overglm.

coefs

an (optional) character string which (partially) match with the names of some model parameters.

identify

an (optional) integer indicating the number of individuals to identify on the plot of the Dfbeta statistic. This is only appropriate if coefs is specified.

...

further arguments passed to or from other methods. If plot.it=TRUE then ... may be used to include graphical parameters to customize the plot. For example, col, pch, cex, main, sub, xlab, ylab.

Details

The one-step approximation of the estimates of the parameters when the i-th individual is excluded from the dataset consists of the vector obtained as result of the first iteration of the Newthon-Raphson algorithm when it is performed using: (1) a dataset in which the i-th individual is excluded; and (2) a starting value which is the estimate of the same model but based on the dataset inluding all individuals.

Value

A matrix with so many rows as individuals in the sample and so many columns as parameters in the linear predictor. The i-th row of that matrix corresponds to the difference between the estimates of the parameters in the linear predictor using all individuals and the one-step approximation of those estimates when the i-th individual is excluded from the dataset.

References

Pregibon D. (1981). Logistic regression diagnostics. The Annals of Statistics, 9, 705-724.

Examples

###### Example 1: Self diagnozed ear infections in swimmers
data(swimmers)
fit1 <- overglm(infections ~ frequency + location, family="nb1(log)", data=swimmers)
dfbeta(fit1, coefs="frequency", col="red", lty=1, lwd=1, col.lab="blue",
       col.axis="blue", col.main="black", family="mono", cex=0.8, main="frequency")

###### Example 2: Article production by graduate students in biochemistry PhD programs
bioChemists <- pscl::bioChemists
fit2 <- overglm(art ~ fem + kid5 + ment, family="nb1(log)", data = bioChemists)
dfbeta(fit2, coefs="fem", col="red", lty=1, lwd=1, col.lab="blue",
       col.axis="blue", col.main="black", family="mono", cex=0.8, main="fem")

###### Example 3: Agents to stimulate cellular differentiation
data(cellular)
fit3 <- overglm(cbind(cells,200-cells) ~ tnf + ifn, family="bb(logit)", data=cellular)
dfbeta(fit3, coefs="tnf", col="red", lty=1, lwd=1, col.lab="blue",
       col.axis="blue", col.main="black", family="mono", cex=0.8, main="tnf")

glmtoolbox documentation built on Sept. 11, 2024, 7:32 p.m.