Skip to content

Commit

Permalink
BLRT now allows runs with errors, and passes warnings along
Browse files Browse the repository at this point in the history
  • Loading branch information
cjvanlissa committed Nov 27, 2024
1 parent d7e12d9 commit 79b1a42
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/blrt.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ blrt_internal <-
mod_simple <-
mxRun(mod_simple,
silent = TRUE,
suppressWarnings = TRUE)
suppressWarnings = FALSE)
mod_complex <-
mxRun(mod_complex,
silent = TRUE,
suppressWarnings = TRUE)
suppressWarnings = FALSE)
c(
mod_simple@output$Minus2LogLikelihood - mod_complex@output$Minus2LogLikelihood,
mod_simple@output$status$code + mod_complex@output$status$code
Expand All @@ -96,7 +96,8 @@ blrt_internal <-
)})
bootres <- do.call(rbind, bootres)
isvalid <- bootres[, 2] == 0
lrdist <- bootres[isvalid, 1]
# lrdist <- bootres[isvalid, 1]
lrdist <- bootres[, 1, drop = FALSE]
out <- data.frame(
lr = lrtest,
df = length(omxGetParameters(mod_complex)) - length(omxGetParameters(mod_simple)),
Expand Down

0 comments on commit 79b1a42

Please sign in to comment.