Closed topepo closed 3 years ago
Thanks - just implemented the na.action
argument to summary.flexsurvreg
in https://github.com/chjackson/flexsurv-dev/commit/1193922396d0f53c0dd42ca716656f8404acdf22.
Any chance that you would change the default to na.pass()
? That would pad the outcome with missing values. Otherwise, the input data has n
rows and the output has < n
rows (but no easy way to figure out how to merge them).
I thought I did this?
The docs have
##' @param na.action a missing-data filter function, applied after any 'subset'
##' argument has been used. Default is \code{options()$na.action}.
That's the doc for flexsurvreg
, not summary.flexsurvreg
This line in
form.model.matrix
automatically drops any rows with missing data.It would be nice to have the ability to get the same number of rows out of the
summary
function's predictions are were innewdata
(otherwise you have to track down the missing rows and pad the predicted values).One idea is to just use
na.pass
and let the predicted values haveNA
. Otherwise, havingna.action
as an option that gets passed along tomodel.frame
would allow the user to make their own choice (but I would vote forna.pass
).