[R] defining "id" argument in geeglm
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Aug 29 11:35:09 CEST 2011
You need to tell use why you want to use a GEE model. From your use
of corstr = "ar1" I would surmise you think the counts are serially
correlated during a year (despite the presence of a 'month' main
effect), in which case the id is 'site'.
All 'id' does is to partition the data into clusters: counts for
different clusters are independent, counts within a cluster are
(potentially) dependent.
The common advice applies: you should talk to a statistician
conversant with GEE models about your model formulation. (My field
experience would suggest that there is no good reason to suppose that
the counts are Poisson: visible occurrences of butterfly species do
not behave independently.)
On Mon, 29 Aug 2011, Anna Mill wrote:
> Hi all,
>
> I am trying to do a generalized estimating equation (GEE) with the "geepack"
> package and I am not 100% sure what exactly the "id" argument means. It
> seems to be an important argument because results differ considerably
> defining different clusters.
>
> I have a data set of counts (poisson distribution): numbers of butterfly
> species counted every month during a period of one year (12 repeated
> measures) at seven sites, three of those being "continuous forest sites" and
> four of those being "secondary forest sites". The aim is to compare
> continuous and secondary forests.
>
> Would you define the sites or the forest type as id argument:
>
> model1<-geeglm(formula = number ~ type + month, family = poisson, *id = site
> *, corstr = "ar1")
>
> model2<-geeglm(formula = number ~ type + month, family = poisson, *id = type
> *, corstr = "ar1")
>
> or should even almost every count have a special id (e.g. *
> id=interaction(month,site)* or *id=interaction(month,type*))
>
> Thanks for your help...
> Anna
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org 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.
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list