[R-sig-ME] About modelling time as continuous variable in a glmmTMB-based model.

Daniel Lüdecke d@|uedecke @end|ng |rom uke@de
Tue Jul 16 22:34:56 CEST 2019


Dear Julian,
typically, time varies across groups, so you should model time as random
slope (i.e. switch time and ID in the random effects):

glmmTMB(Observations ~ CAP * Time + (Time | ID), data=mDATA, ziformula=~
CAP * Time, family=poisson)

Best
Daniel


Julian Gaviria Lopez <Julian.GaviriaLopez using unige.ch> schrieb am Di., 16.
Juli 2019, 17:25:

> Dear lists members,
>
> Based on the glmmTMB-based model:
>
> Model 1. Time as a fixed factor:
> zipoisson <- glmmTMB(Observations ~ CAP * Time + (1|ID), data=mDATA,
> ziformula=~ CAP * Time , family=poisson)
>
> A gentle member from this list suggested me to treat time as continuous.
> Since I am new with mixed models, I would like to confirm that the new
> models for this aim are right:
>
> Model 2. Time as continuous variable:
> zipoisson <- glmmTMB(Observations ~ CAP * Time + (ID|Time), data=mDATA,
> ziformula=~ CAP * Time, family=poisson)
>
> Model 3.  Time as continuous, with the dispersion parameter identical for
> each observation:
> zipoisson <- glmmTMB(Observations ~ CAP + (ID|Time), data=mDATA,
> ziformula=~ 1, family=poisson)
>
>
> It calls my attention that models 1 and 2 yield the same results. In this
> way, I wonder whether I did model time properly. Maybe I should introduce
> the levels of "Time" differently?
>
> current arranging of time data:
> Time
>   m1
>   m2
>   m3
>
> Alternative option?
> TIme
>    1
>    2
>    3
>
>
> I thank you in advance for any comment in this regard.
>
> Best regards,
>
>
> Julian Gaviria
> Neurology and Imaging of cognition lab (Labnic)
> University of Geneva. Campus Biotech.
> 9 Chemin des Mines, 1202 Geneva, CH
> Tel: +41 22 379 0380
> Email: Julian.GaviriaLopez using unige.ch
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
--

_____________________________________________________________________

Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de
Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Marya Verdel
_____________________________________________________________________

SAVE PAPER - THINK BEFORE PRINTING

	[[alternative HTML version deleted]]



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