Skip to content

Difference between printed and specified predictor matrix #578

Answered by stefvanbuuren
kasiakasia93 asked this question in Q&A
Discussion options

You must be logged in to vote

Welcome to MICE discussions.

There is a difference between the real object imp2$predictorMatrix and the version that is printed on the terminal by imp2. Here's what mice does to produce the printed version:

library(mice, warn.conflicts = FALSE)
mice:::print.mids
#> function (x, ...) 
#> {
#>     cat("Class: mids\n")
#>     cat("Number of multiple imputations: ", x$m, "\n")
#>     cat("Imputation methods:\n")
#>     print(x$method, ...)
#>     cat("PredictorMatrix:\n")
#>     print(head(x$predictorMatrix), ...)
#>     if (!is.null(x$loggedEvents)) {
#>         cat("Number of logged events: ", nrow(x$loggedEvents), 
#>             "\n")
#>         print(head(x$loggedEvents), ...)
#>     }
#>…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hanneoberman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants