I'm trying to replicate Table 13.8 from Fitzmaurice, Laird, & Ware (2011) using R for teaching purposes. This is a GEE count model of the number of bacteria on 30 patients at two waves. In their SAS-estimated results, they get a correlation between the two waves of 0.797. My "geepack" results in R, however, give me a 0 correlation. (And I get a 0 correlation when I try other count data.)
Any ideas as to how I can get a result more like their SAS results? Effectively I'm just looking for a positive estimated correlation.
My coefficients are similar in scale to theirs. My full script is posted here, with the COUNT EXAMPLE halfway down being of interest. Here's what I get when I plug the relevant lines of code into R. Notice the "alpha" param:
library(geepack)
library(reshape)
library(nlme)
library(car)
library(MuMIn)
leprosy<-read.table("http://spia.uga.edu/faculty_pages/monogan/teaching/pd/leprosy.txt", header=TRUE, sep="")
leprosy$id<-c(1:nrow(leprosy))
leprosy$drug<-relevel(leprosy$drug,"C")
leprosy$antibiotic<-1-as.numeric(leprosy$drug=="C")
m.leprosy<-melt.data.frame(data=leprosy, measure.vars=c("pre","post"), id=c("id","drug","antibiotic"))
m.leprosy$time<-as.numeric(m.leprosy$variable=="post")
m.leprosy$a<-as.numeric(m.leprosy$time==1 & m.leprosy$drug=="A")
m.leprosy$b<-as.numeric(m.leprosy$time==1 & m.leprosy$drug=="B")
m.leprosy$treat<-as.numeric(m.leprosy$time==1 & m.leprosy$antibiotic==1)
mod.3<-geeglm(value~time+a+b, id=id, waves=time, family=poisson(link="log"), data=m.leprosy,corstr="exchangeable")
summary(mod.3)
Call:
geeglm(formula = value ~ time + a + b, family = poisson(link = "log"),
data = m.leprosy, id = id, waves = time, corstr = "exchangeable")
Coefficients:
Estimate Std.err Wald Pr(>|W|)
(Intercept) 2.3734 0.0801 877.10 <2e-16 ***
time 0.1362 0.1919 0.50 0.4778
a -0.8419 0.3155 7.12 0.0076 **
b -0.7013 0.3493 4.03 0.0447 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Estimated Scale Parameters:
Estimate Std.err
(Intercept) 3.2 0.454
Correlation: Structure = exchangeable Link = identity
Estimated Correlation Parameters:
Estimate Std.err
alpha 0 0
Number of clusters: 60 Maximum cluster size: 1
I tend to believe Fitzmaurice, Laird, & Ware's results of a positive correlation. Any help would be very much appreciated!