Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Dec 2, 2024
1 parent 18a0cda commit 7f3472e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions R/methods_mice.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ p_value.mipo <- function(model, ...) {
p = as.vector(s$p.value)
)
# check for ordinal-alike models
if ("y.level" %in% colnames(s)) {
out$Response <- as.vector(s$y.level)
if (!is.null(model$pooled) && "y.level" %in% colnames(model$pooled)) {
out$Response <- as.vector(model$pooled$y.level)
}
out
}
Expand All @@ -45,8 +45,8 @@ standard_error.mipo <- function(model, ...) {
SE = as.vector(s$std.error)
)
# check for ordinal-alike models
if ("y.level" %in% colnames(s)) {
out$Response <- as.vector(s$y.level)
if (!is.null(model$pooled) && "y.level" %in% colnames(model$pooled)) {
out$Response <- as.vector(model$pooled$y.level)
}
out
}
Expand Down Expand Up @@ -85,8 +85,7 @@ model_parameters.mipo <- function(model,
)

# check if we have ordinal/categorical response
s <- summary(model)
if ("y.level" %in% colnames(s)) {
if (!is.null(model$pooled) && "y.level" %in% colnames(model$pooled)) {
merge_by <- c("Parameter", "Response")
} else {
merge_by <- "Parameter"
Expand Down

0 comments on commit 7f3472e

Please sign in to comment.