stc04003 / reReg

Regression methods for recurrent event data
https://www.sychiou.com/reReg/index.html
21 stars 5 forks source link

Different results - package #30

Closed csthiago closed 8 months ago

csthiago commented 9 months ago

I have been using reReg and thanks for the work!

I encountered a peculiar situation in which the results from the reReg package differed from the mets (for the same model)

Here an example:


library(mets)
library(reReg)
library(dplyr)
data(simDat)
simDat <- simDat |> 
  mutate(statusG = case_when(
    event==1 ~ 1,
    status == 1 ~ 2,
    TRUE ~ 0
  ))

reReg(Recur(t.start %to% t.stop, id, event, status) ~ x1, data = simDat, model = "cox.GL") #Ghosh and Lin (2002)

#coef x1 =  -1.0747

reReg(Recur(t.start %to% t.stop, id, event, status) ~ x1, data = simDat, model = "am.GL") #Ghosh and Lin (2003)

# coef x1 = -2.136
recreg(Event(t.start,t.stop,statusG)~x1+cluster(id),data=simDat,cause=1,death.code=2, cens.code = 0) #mets - Ghosh-Lin IPCW Cox-type model
# coef x1 -1.285382
stc04003 commented 8 months ago

Our package implements IPSW estimator from Ghosh and Lin (2002) when model = "cox.GL", whereas the mets::recreg() implements the IPCW estimator from the same paper. I think this could be the reason for the different results.

csthiago commented 8 months ago

Thanks for clarifying!