BCgee: Function to obtain bias-corrected estimates for regression...

Description Usage Arguments Details Author(s) References See Also Examples

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
##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
}

BCgee documentation built on May 2, 2019, 11:10 a.m.

Related to BCgee in BCgee...