Package 'BCgee'

Title: Bias-Corrected Estimates for Generalized Linear Models for Dependent Data
Description: Provides bias-corrected estimates for the regression coefficients of a marginal model estimated with generalized estimating equations. Details about the bias formula used are in Lunardon, N., Scharfstein, D. (2017) <doi:10.1002/sim.7366>.
Authors: Nicola Lunardon <[email protected]>, Daniel Scharfstein <[email protected]>
Maintainer: Nicola Lunardon <[email protected]>
License: GPL-2
Version: 0.1.1
Built: 2024-11-09 03:06:01 UTC
Source: https://github.com/cran/BCgee

Help Index


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. [email protected]

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
}

Cerebrovascular Deficiency

Description

The cereb data frame has 134 rows and 4 columns. The dataset consists of safety data from a crossover trial on the disease cerebrovascular deficiency. In this two-period crossover trial, comparing the effects of active drug to placebo, 67 patients were randomly allocated to the two treatment sequences, with 34 patients receiving placebo followed by active treatment, and 33 patients receiving active treatment followed by placebo. The response variable is binary, indicating whether an electrocardiogram (ECG) was abnormal (Y=1) or normal (Y=0). Each patient has a bivariate binary response vector.

Usage

data(cereb)

Format

This data frame contains the following columns:

id

patient's unique id number

Period

Period in the trial, 0=Period 1, 1=Period 2

Drug

Treatment, 0=Placebo, 1=Active Drug

y

ECG Response, 0=Normal, 1=Abnormal

References

Jones, B. and Kenward, M.G. (1989). Design and Analysis of Cross-over Trials. London: Chapman and Hall/CRC Press.

Diggle, P.J., Liang, K.Y., and Zeger, S.L. (1994). Analysis of Longitudinal Data. Clarendon Press.

Examples

##see help page of function BCgee

Epiliptic Seizures

Description

The seizure data frame has 59 rows and 7 columns. The dataset has the number of epiliptic seizures in each of four two-week intervals, and in a baseline eight-week inverval, for treatment and control groups with a total of 59 individuals.

Usage

data(seizure)

Format

This data frame contains the following columns:

y1

the number of epiliptic seizures in the 1st 2-week interval

y2

the number of epiliptic seizures in the 2nd 2-week interval

y3

the number of epiliptic seizures in the 3rd 2-week interval

y4

the number of epiliptic seizures in the 4th 2-week interval

trt

an indicator of treatment

base

the number of epilitic seizures in a baseline 8-week interval

age

a numeric vector of subject age

Source

Thall, P.F. and Vail S.C. (1990). Some covariance models for longitudinal count data with overdispersion, Biometrics, 46, 657–671.

Højsgaard, S., Halekoh, U. & Yan J. (2006). The R Package geepack for Generalized Estimating Equations, Journal of Statistical Software, 15, 1–11

References

Diggle, P.J., Liang, K.Y., and Zeger, S.L. (1994). Analysis of Longitudinal Data. Clarendon Press.

Examples

##see help page of function BCgee