[R-sig-ME] three-levels of nesting in poisson mixed effect regression?

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Mon Jun 3 13:35:28 CEST 2013


Dear Andrey,

Don't use dummy variables, use a factor instead.

Then your formula reduces to

Outcomes ~ offset(log(N)) + 0 + disease:(Gender  + FE1 + FE2 + FE3) +  (0 + disease|State) + (0 + disease|County)

Gender is not suitable as random effect because it has to few levels.

Best regards,

Thierry

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51
+ 32 54 43 61 85
Thierry.Onkelinx op inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey


-----Oorspronkelijk bericht-----
Van: r-sig-mixed-models-bounces op r-project.org [mailto:r-sig-mixed-models-bounces op r-project.org] Namens Rzhetsky, Andrey [BSD] - MED
Verzonden: zaterdag 1 juni 2013 21:05
Aan: R-SIG-Mixed-Models op R-Project.org
Onderwerp: [R-sig-ME] three-levels of nesting in poisson mixed effect regression?

Could you please help me out with notation in lme4?

I am trying to implement a bivariate county-level outcome (Poisson response with county-level offset N) over incidence of 2 diseases, dis1 and dis2, using dummy binary indicators, dis1 and dis2, and fixed effects duplicated as dis1*fixed_eff_i and dis2*fixed_eff_i.

My data is nested at several levels: states, counties, and diseases (also genders?).  Could you please help me to check/define notation  that would reflect most faithfully the 3-level structure?

This is what I have now.

Out  <- glmer(formula = Outcomes ~ 1 + offset(log(N)) + (0 + dis1|State) + (0 + dis2|County) + (0 + dis1|State) + (0 + dis2|County) + dis1.Gender + dis2.Gender + (other fixed effects), naGQ = 7,verbose=FALSE,family=poisson,REML=FALSE,data=data,na.action = na.exclude, maxIter=200000, maxFn=10000000)")

Would be very grateful for any clarification/correction.

Thank you!

Andrey


        [[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models op r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
* * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is door een geldig ondertekend document.
The views expressed in this message and any annex are purely those of the writer and may not be regarded as stating an official position of INBO, as long as the message is not confirmed by a duly signed document.



More information about the R-sig-mixed-models mailing list