Access to dummy variables in internal mice procedure ('pad' element of mids object is missing) #626
-
Hello all, mice allows specification of passive imputation for interaction terms. Interaction terms involving a categorical variable will always need to work with dummy variables. It is recommend accessing the dummy versions of the categorical variables that are used internally in mice, see section 3.4: passive imputation, top of page 30 in previously linked manuscript "Interactions involving categorical variables need a representation using dummy variables. The mice() function internally creates dummy variables for any factor that are being used as a predictor. The data and names of these dummy variables can be accessed from imp$pad$data." I cannot seem to access the pad element of the mice object. Has this been removed? Has it been transferred into another element of the mice object? I note this was fixed as a bug in mice 2.4.1: https://github.com/amices/mice/blob/master/NEWS.md Many thanks for any assistance! Reproducible example taken directly from linked manuscript. R version 4.3.1, using mice version 3.16.0 (as available on CRAN):
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @alexpate30, you're right, this functionality is superseded. See #235 (comment) |
Beta Was this translation helpful? Give feedback.
Hi @alexpate30, you're right, this functionality is superseded. See #235 (comment)