Skip to content

Commit

Permalink
include try on confint call
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyDoorn committed Nov 18, 2024
1 parent 8c847d8 commit 0147814
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/generalizedlinearmodel.R
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,10 @@ GeneralizedLinearModelInternal <- function(jaspResults, dataset = NULL, options,
rowNames <- rownames(modelSummary)

if (options[["coefficientCi"]]) {
coefCiSummary <- confint(fullModel, level = options[["coefficientCiLevel"]])
coefCiSummary <- try(confint(fullModel, level = options[["coefficientCiLevel"]]))
if (jaspBase::isTryError(coefCiSummary)) {
quitAnalysis("Confidence intervals not available for this model, try other predictors, families, or links.")
}
if (length(rowNames) == 1) coefCiSummary <- matrix(coefCiSummary, ncol = 2)
} else {
coefCiSummary <- matrix(nrow = length(rowNames),
Expand Down

0 comments on commit 0147814

Please sign in to comment.