## tests
# load data
data(geesimdata)
x<-geesimdata$x
y<-geesimdata$y
id<-geesimdata$id
corstr<-"exchangeable"
dist<-"poisson"
# obtain the estimates
library(geepack)
fit<-geeglm(y~x-1,data=geesimdata,family =dist,id=id,corstr = corstr)
beta<-fit$coefficients
rho<-unlist(summary(fit)$corr[1])
phi<-unlist(summary(fit)$dispersion[1])
r<-rep(1,nrow(x))
lambda<-lambda.find.gee.mean(x,y,id,beta,r,dist,rho,phi,corstr)
lambda
Run the code above in your browser using DataLab