hputter / mstate

https://hputter.github.io/mstate/
7 stars 5 forks source link

Inconsistent text (wrong p-value?) in mstate vignette #22

Open huftis opened 1 year ago

huftis commented 1 year ago

I’m reading your tutorial vignette for the mstate package, https://cran.r-project.org/web/packages/mstate/vignettes/Tutorial.pdf, and found a statement which seems inconsistent with the data / R output. On page 9, you write:

There is no evidence of non-proportionality of the baseline transition intensities of transitions 2 (p=0.496 for pr).

However, the table for cox.zph(c2) above clearly does show evidence of non-proportionality. The p-value is listed as 5.2e-05 (i.e., 0.000052), not 0.496. I have also tried running the corresponding code with the latest version of R and the packages, and I too get a p-value of 5.2e-05.

(On the other hand, based on the figure in the vignette and in the original tutorial, proportional hazards does seem like a reasonable assumption, so I’m not sure what’s going on.)

huftis commented 1 year ago

According to the Wayback Machine, https://web.archive.org/web/20140813090712/https://cran.r-project.org/web/packages/mstate/vignettes/Tutorial.pdf, in 2014, the output in the vignette did have a p-value of 0.496. The coefficient estimates of c2are identical, so did perhaps something change in cox.zph() in the meantime? The help file mentions an improvement in version 3.0 (I don’t know the release date). Even so, a change in p-value from 0.496 to 0.000052 seems rather extreme.

hputter commented 1 year ago

Thanks @huftis for noticing. I am contacting Terry Therneau to see if he knows anything about this.