[R] gee with auto-regressive correlation structure (AR-M)

Antonio.Gasparrini at lshtm.ac.uk Antonio.Gasparrini at lshtm.ac.uk
Wed Feb 11 11:41:26 CET 2009


Dear all,
 
I need to fit a gee model with an auto-regressive correlation structure and I faced some problems.
I attach a simple example:
 
#######################################################
library(gee)
library(geepack)

# I SIMULATE DATA FROM POISSON DISTRIBUTION, 10 OBS FOR EACH OF 50 GROUPS
set.seed(1)
y <- rpois(500,50)
x <- rnorm(500)
id <- rep(1:50,each=10)

# EXAMPLES FOR EXCHANGEABLE AND AR(1) CORRELATION STRUCTURES
model1 <- gee(y ~ x, family=poisson(),id=id, corstr="exchangeable")
model2 <- gee(y ~ x, family=poisson(),id=id, corstr="AR-M")

# NOW 50 OBS FOR EACH OF 10 GROUPS
id2 <- rep(1:10,each=50)
model3 <- gee(y ~ x, family=poisson(),id=id2, corstr="exchangeable")
model4 <- gee(y ~ x, family=poisson(),id=id2, corstr="AR-M")
# ERROR
model5 <- geeglm(y ~ x, family=poisson(),id=id2, corstr="ar1")
##########################################################

Basically, it seems that the gee command (package gee) doesn't work when the id groups are large, as in my dataset (observations from
several summer seasons, for which I imagine an AR correlation structure within each season).
The command geeglm (package geepack) seems to work, but provides only few corstr choices (for example not stat_M_dep, which can be useful 
to investigate models with different correlation structures)

Any suggestions?
Thanks so much for your time

Antonio Gasparrini
Public and Environmental Health Research Unit (PEHRU)
London School of Hygiene & Tropical Medicine
Keppel Street, London WC1E 7HT, UK
Office: 0044 (0)20 79272406 - Mobile: 0044 (0)79 64925523
Skype contact: a.gasparrini
http://www.lshtm.ac.uk/people/gasparrini.antonio 




More information about the R-help mailing list