hesim-dev / hesim

Health economic simulation modeling and decision analysis
https://hesim-dev.github.io/hesim/
62 stars 17 forks source link

Problem when internal knots are used in survspline with clock="forward"/"age"/"time" #125

Open caterinagregorio opened 1 month ago

caterinagregorio commented 1 month ago

Hello,

Every time I have a transition defined as follows with one or more internal knots and with the clock-forward time scale, the simulation gets stuck. It does not give an error but it keeps going and going.

params_surv( coefs = coefs, dist = "survspline", aux = list( knots = knots, scale = "log_cumhazard", timescale = "log" ))

The problem gets fixed either using a transition model on the clock reset time scale or by using a baseline with no internal knots. Do you have some ideas of what the problem may be or what I am doing wrong?

Best, Caterina

mclements commented 1 month ago

Caterina: did you construct the model params_surv object using create_params or by hand? If the former: do you get the same object if use create_params?

Note that it would be helpful if you could provide a minimal example -- otherwise this is a little theoretical:).

Kindly, Mark.