aboutsummaryrefslogtreecommitdiff
path: root/R/illparms.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-10-13 03:48:54 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2022-10-13 03:50:05 +0200
commit37bd36fe8a75163cbf0f97cb7a0e2f7466a53617 (patch)
tree96bbd9b61006731b3d295e517def3b66ecd959ef /R/illparms.R
parente7e8105390ebf3d6f034811bc7cce1d9640b7357 (diff)
Cope with failed FIM inversions
Diffstat (limited to 'R/illparms.R')
-rw-r--r--R/illparms.R18
1 files changed, 13 insertions, 5 deletions
diff --git a/R/illparms.R b/R/illparms.R
index c2f0263b..931d8f05 100644
--- a/R/illparms.R
+++ b/R/illparms.R
@@ -106,12 +106,20 @@ illparms.mhmkin <- function(object, conf.level = 0.95, random = TRUE, errmod = T
}
result <- lapply(object,
function(fit) {
- if (check_failed(fit)) return("E")
- ill <- illparms(fit, conf.level = conf.level, random = random, errmod = errmod)
- if (length(ill) > 0) {
- return(paste(ill, collapse = ", "))
+ if (check_failed(fit)) {
+ return("E")
} else {
- return("")
+ if (!is.null(fit$FIM_failed) &&
+ "random effects and error model parameters" %in% fit$FIM_failed) {
+ return("NA")
+ } else {
+ ill <- illparms(fit, conf.level = conf.level, random = random, errmod = errmod)
+ if (length(ill) > 0) {
+ return(paste(ill, collapse = ", "))
+ } else {
+ return("")
+ }
+ }
}
})
result <- unlist(result)

Contact - Imprint