Last data update: 2014.03.03

R: Modified score test for generalized linear models
mdscoreR Documentation

Modified score test for generalized linear models

Description

Computes the modified score test based for the coefficients of a generalized linear model.

Usage

mdscore(model = model, X1 = X1, phi = NULL)

Arguments

model

an object that stores the results of glm fit of the model under the null hypothesis.

X1

the matrix with the columns of the model matrix X that correspond to the coefficients being specified in the null hypothesis.

phi

the precision parameter.

Details

The object fit.model is obtained using the usual options passed to the glm function.

Value

The function mdscore() returns the following list of values:

Sr

the value of the score statistic.

Srcor

the value of the modified score statistic.

coef

a vector with the coefficients A1 , A2 and A3.

n

the total sample size.

df

the number of degrees of freedom of the chi–squared approximations for the tests.

phi

the precision parameter used in the computations

Author(s)

Antonio Hermes M. da Silva-Junior hermes@ccet.ufrn.br

Damiao N. da Silva damiao@ccet.ufrn.br

References

Cordeiro GM, Ferrari SLP (1991). A Modified Score Test Statistic Having chi-squared Distribution to Order n–1 . Biometrika, 78(3), 573–582.

Cordeiro GM, Ferrari SLP, Paula GA (1993). Improved Score Tests for Generalized Linear Models. Journal of the Royal Statistical Society B, 55(3), 661–674.

Cribari-Neto F, Ferrari SLP (1995). Second Order Asymptotics for Score Tests in Generalised Linear Models. Biometrika, 82(2), 426–432.

da Silva-Junior AHM, da Silva DN, Ferrari SLP (2014). mdscore: An R Package to Compute Improved Score Tests in Generalized Linear Models. Journal of Statistical Software, 61(2), 1-16., http://www.jstatsoft.org/v61/c02/

See Also

summary.mdscore

Examples

data(strength)
fitf <- glm(y ~ cut * lot, data = strength,family = inverse.gaussian("inverse"))
summary(fitf)
X <- model.matrix(fitf, data = strength)
fit0 <- glm(y ~ cut + lot, data = strength, family = inverse.gaussian("inverse"))
mdscore(fit0, X1=X[, 7:10])

Results