Skip to content

Commit

Permalink
Handle ill-conditioned ll
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonysena committed Apr 27, 2024
1 parent 6d71bca commit 8864e92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/ModelFitting.R
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,10 @@ fitSccsModel <- function(sccsIntervalData,
priorVariance <- 0
status <- fit
} else {
if (!is.null(profileGrid) || !is.null(profileBounds)) {
if ((!is.null(profileGrid) || !is.null(profileBounds)) && fit$return_flag != "ILLCONDITIONED") {
covariateIds <- intersect(needProfile, as.numeric(Cyclops::getCovariateIds(cyclopsData)))
getLikelihoodProfile <- function(covariateId) {
if (all(fit$estimates))
logLikelihoodProfile <- Cyclops::getCyclopsProfileLogLikelihood(
object = fit,
parm = covariateId,
Expand Down

0 comments on commit 8864e92

Please sign in to comment.