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

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to