[R-sig-ME] Time-dependent Negative binomial regression

Amirhossei@@Amirhossei@T@iebi m@iii@g oii r@dboudumc@@i Amirhossei@@Amirhossei@T@iebi m@iii@g oii r@dboudumc@@i
Thu Jul 8 08:59:16 CEST 2021

Dear responders,

Recently I have processed and cleaned a data for the aim of application of a negative binomial regression.

First, I tried to use the function glm.nb of package MASS in R and I had a problem with ensuring that the model will realize the data are for one unique participant (possible correlations in a group of observations).

Then, I realized that I can use glmmPQL of package MASS or glmer of package lme4 and use the family negative binomial in it's family link.

The question is I would like to know in which part of the model I can embed the offset (logarithm of the number of days of treatment) also how should I insert the time-constant observations for an id (such as gender and baseline age in the df)?

My latest attempt was:

(glmmPQL (event ~ treatment + offset (log(person.time)) ,
random= list (id=~1, gender=~1, baseline.age=~1),
family= negative.binomial (theta=1.75), data=df ))

which faced with a memory-related error (probably because of the wrong code). data example:

df<-data.frame(id=rep(1:3,each=4),treatment=sample(c(0,1),12,replace = T),
event=sample(c(0,1),12,replace = T),
person.time=sample(c(15,31,30),12,replace = T),

Thank you for your time and considerations,


De informatie in dit bericht is uitsluitend bestemd voor de geadresseerde. Aan dit bericht en de bijlagen kunnen geen rechten worden ontleend. Heeft u deze e-mail onbedoeld ontvangen? Dan verzoeken wij u het te vernietigen en de afzender te informeren. Openbaar maken, kopi�ren en verspreiden van deze e-mail of informatie uit deze e-mail is alleen toegestaan met voorafgaande schriftelijke toestemming van de afzender. Het Radboudumc staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 80262783.

The content of this message is intended solely for the addressee. No rights can be derived from this message or its attachments. If you are not the intended recipient, we kindly request you to delete the message and inform the sender. It is strictly prohibited to disclose, copy or distribute this email or the information inside it, without a written consent from the sender. Radboud university medical center is registered with the Dutch Chamber of Commerce trade register with number 80262783.

	[[alternative HTML version deleted]]

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