BCgee {BCgee}R Documentation

Function to obtain bias-corrected estimates for regression coefficients of a marginal model estimated with generalized estimating equations.

Description

The function takes as an input an object of class gee and produces an object of class BCgee which contains the bias-corrected estimates of regression coefficients and further quantities; see details.

Usage

BCgee(fit)

Arguments

fit

A fitted model from gee package. The object must be of class gee.

Details

The function computes bias-corrected estimates of regression coefficients by using quantities in the supplied object of class gee. The output is an object of class BCgee which has the same structure of an object of class gee. The output of the two classes differ because quantities included in the object of class BCgee are computed with the bias-corrected estimates.

Methods print and summary are available for objects of class BCgee.

Author(s)

Lunardon, N. nicola.lunardon@unimib.it

References

Lunardon, N., Scharfstein, D. (2017). Comment on "Small sample GEE estimation of regression parameters for longitudinal data". Statistics in Medicine, <doi:10.1002/sim.7366>.

See Also

glm, gee

Examples

##Cerebrovascular deficiency example
##see page 153 of Diggle, P., Liang, K.-Y., Zeger, S. (1994). Analysis of longitudinal data. 
data(cereb)

if(require(gee)){
fit <- gee(y ~ Period+Drug, id = id, data = cereb, family = binomial(logit), 
corstr = "exchangeable")
fitbc <- BCgee(fit)
##compare coefficients, standard errors, and Wald statistics
summary(fit)$coefficients
summary(fitbc)$coefficients
##compare residuals
fit$residuals
fitbc$residuals
}

##Seizure example from geepack
##see page 166 of Diggle, P., Liang, K.-Y., Zeger, S. (1994). Analysis of longitudinal data. 
data(seizure)
seiz.l <- reshape(seizure,
          varying=list(c("base","y1", "y2", "y3", "y4")),
          v.names="y", times=0:4, direction="long")
     seiz.l <- seiz.l[order(seiz.l$id, seiz.l$time),]
     seiz.l$t <- ifelse(seiz.l$time == 0, 8, 2)
     seiz.l$x <- ifelse(seiz.l$time == 0, 0, 1)


if(require(gee)){
fit <- gee(y ~ offset(log(t)) + x + trt + x:trt, id = id, data=seiz.l, corstr="exchangeable", 
family=poisson(log))
fitbc <- BCgee(fit)
##compare coefficients, standard errors, and Wald statistics
summary(fit)$coefficients
summary(fitbc)$coefficients
##compare residuals
fit$residuals
fitbc$residuals
}

[Package BCgee version 0.1.1 Index]