chjackson / survextrap

Survival Extrapolation With a Flexible Parametric Model and External Data
https://chjackson.github.io/survextrap/
GNU General Public License v3.0
7 stars 3 forks source link

Allow non-proportional hazards model with external data #11

Closed irtimmins closed 6 months ago

irtimmins commented 6 months ago

Hi Chris, I can't run survextrap when providing external data using external argument along with having nonprop = TRUE. I think this combination in principle should work?


## This PH model with external data runs fine.
mod_seer <- survextrap(Surv(years, d) ~ treat, data = cetux,                      
                       external=cetux_seer)

## This non-PH model without external data works.
mod_nph <- survextrap(Surv(years, d) ~ treat, data = cetux, nonprop = TRUE)

# But the combination of external data and non-PH doesn't run?
mod_nph_seer <- survextrap(Surv(years, d) ~ treat, data=cetux,  external=cetux_seer,
                      nonprop = TRUE)
chjackson commented 6 months ago

Thanks for the report - I think this is now fixed in https://github.com/chjackson/survextrap/commit/2a368e5001a2a6c89baf161c6bd28e1f9731a094 though it may not propagate to r-universe for a day or so.

irtimmins commented 6 months ago

Thanks Chris, this all works fine now for me too.