Skip to content

Commit

Permalink
fix state with casewise diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyDoorn committed May 7, 2024
1 parent 929a7be commit 2baed2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/commonglm.R
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@
} else {


depType <- if (isFALSE(logisticRegression)) "number" else "string"
depType <- if (is.numeric(dataset[[options[["dependent"]]]])) "number" else "string"
influenceTable$addColumnInfo(name = "caseN", title = "Case Number", type = "integer")
influenceTable$addColumnInfo(name = "stdResidual", title = gettext("Std. Residual"), type = "number", format = "dp:3")
influenceTable$addColumnInfo(name = "dependent", title = options$dependent, type = depType)
Expand Down
8 changes: 4 additions & 4 deletions R/regressionlogistic.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ RegressionLogisticInternal <- function(jaspResults, dataset = NULL, options, ...
.reglogisticCheckErrors(dataset, options)
}
# Output tables
model <- .reglogisticComputeModel( jaspResults, dataset, options, ready)
.reglogisticComputeModel( jaspResults, dataset, options, ready)
.reglogisticModelSummaryTable( jaspResults, dataset, options, ready)
.reglogisticEstimatesTable( jaspResults, dataset, options, ready)
.reglogisticEstimatesTableBootstrap( jaspResults, dataset, options, ready)
.reglogisticMulticolliTable( jaspResults, dataset, options, ready)
.reglogisticFactorDescriptivesTable( jaspResults, dataset, options, ready)

if (options$residualCasewiseDiagnostic && is.null(jaspResults[["influenceTable"]])) {
finalModel <- model[[length(options[["modelTerms"]])]]
.glmInfluenceTable(jaspResults, finalModel, dataset, options, ready, position = 5, logisticRegression = TRUE)
if (options$residualCasewiseDiagnostic) {
finalModel <- jaspResults[["glmRes"]][["object"]][[length(options[["modelTerms"]])]]
.glmInfluenceTable(jaspResults, finalModel, dataset, options, ready, position = 5)
.regressionExportResiduals(jaspResults, finalModel, dataset, options, ready = ready)
}

Expand Down

0 comments on commit 2baed2f

Please sign in to comment.