I'm not sure if this patch is acceptable but the edge-case here is the following:
fit <- tryCatch(
{
Cyclops::fitCyclopsModel(cyclopsData, prior = prior, control = control)
},
error = function(e) {
e$message
}
)
The fit$estimates$estimate_value (not sure if my variable names are 100% right) are all NA which then causes problems downstream when attempting to call Cyclops::getCyclopsProfileLogLikelihood, specifically here since the with the error "missing value where TRUE/FALSE needed".
I believe that this is due to the model being ill-conditioned and so I've added a check for the fit$return_flag to skip the log likelihood in this case.
I'm not sure if this patch is acceptable but the edge-case here is the following:
The
fit$estimates$estimate_value
(not sure if my variable names are 100% right) are allNA
which then causes problems downstream when attempting to callCyclops::getCyclopsProfileLogLikelihood
, specifically here since the with the error "missing value where TRUE/FALSE needed".I believe that this is due to the model being ill-conditioned and so I've added a check for the
fit$return_flag
to skip the log likelihood in this case.