Skip to content

Commit

Permalink
Fix diagnostic if model won't fit
Browse files Browse the repository at this point in the history
  • Loading branch information
Admin_mschuemi authored and Admin_mschuemi committed Oct 7, 2024
1 parent 65ba03f commit 17cec00
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/Diagnostics.R
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,9 @@ computeExposureChangeP <- function(sccsData, studyPopulation, exposureEraId = NU
modelType = "cpr",
quiet = TRUE)
fit <- Cyclops::fitCyclopsModel(cyclopsData)
if (fit$return_flag != "SUCCESS") {
return(NA)
}
fit$log_likelihood
logRr <- coef(fit)
if (logRr >= bounds[1] && logRr <= bounds[2]) {
Expand Down

0 comments on commit 17cec00

Please sign in to comment.