Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions R/fimsfit.R
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ fit_fims <- function(input,

if (is.null(opt)) {
failed_nlminb_object <- return_failed_nlminb(obj)
failed_fit <- fit <- FIMSFit(
failed_fit <- fit <- FIMSFit(
input = input,
obj = obj,
opt = failed_nlminb_object[["opt"]],
Expand Down Expand Up @@ -608,7 +608,7 @@ fit_fims <- function(input,
"i" = "The failed results are being returned."
))
failed_nlminb_object <- return_failed_nlminb(obj)
failed_fit <- fit <- FIMSFit(
failed_fit <- fit <- FIMSFit(
input = input,
obj = obj,
opt = failed_nlminb_object[["opt"]],
Expand Down Expand Up @@ -721,7 +721,7 @@ try_nlminb <- function(object, control_list, starting_values) {
}

return_failed_nlminb <- function(object) {
failed_nlminb_message <- c(
failed_nlminb_message <- c(
"x" = "{.fun fit_fims} did not lead to a converged model.",
"i" = "The resulting coefficients, probability values, or predictions are
not accurate or stable and should not be used for management.",
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-fimsfit.R
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ test_that("fit_fims() errors when optimization fails to converge", {
value = -Inf
),
by = c("module_name", "label", "age")
) |>
) |>
initialize_fims(data = data_4_model)
test_results <- suppressWarnings(suppressMessages(
fit_fims(initialized_poor_model, optimize = TRUE)
Expand All @@ -249,6 +249,6 @@ test_that("fit_fims() errors when optimization fails to converge", {
names(get_opt(test_results)),
c("par", "objective", "convergence", "message")
)

clear()
})