Closed helske closed 2 years ago
Now that I thought more about this, perhaps the current behaviour is exactly what we want, as in this other option fixing the start time would vary between individuals which would make interpretation of the aggregate predictions (over individuals) quite confusing.
This was actually completed in eb2fb5ca43fdf8cf7d9b205b8793fa2178ac87d6 by adding the argument global_fixed
to predict
which allows for both individual level and global interpretation of the fixed time points.
In
dynamite
, the data is expanded to include missing time points, whereas inpredict
thenewdata
was taken as is, which caused issues due to different number of ids per time index and incorrect handling of gaps in the data. I addedfill_time_predict
function and call to this inparse_newdata
in a2fc06e86759a0f0f23a854721db63b888605394, but now in the case whennewdata
is NULL,clear_nonfixed
will set some groups full of NAs the starting time in the original data was not the first time point in the data. I first thought this was a bug, but this does work as designed. But inpredict
, perhaps a better way would be to only fill the gaps for each individual, and not expand beyond the start and end time of each individual so we would still get predictions for everyone (Although I can see this being bit confusing in some cases). This would need some changes at least togenerate_sim_call
.