-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
currently, in irmi only simple formulas for each variable can be specified, such as
form=list(
NonD = c("BodyWgt", "BrainWgt"),
Dream = c("BodyWgt", "BrainWgt"),
Sleep = c("BrainWgt"),
Span = c("BodyWgt"),
Gest = c("BodyWgt", "BrainWgt")
)However, it should also work for any formula specified (as long as the correct variable names are used).
library(VIM)
data(sleep)
form = list(
"log(NonD) ~ log(BodyWgt) + log(BrainWgt) + I(Sleep^2)",
"Dream ~ BodyWgt + BrainWgt:Danger",
"log(Sleep) ~ BrainWgt * Danger + I(BrainWgt^2)",
"Span ~ ."
"Gest ~ sqrt(BodyWgt) + Span * Danger"
)
irmi(sleep, modelFormulas = form, trace = TRUE)Only with this enhancement irmi can outperform other imputation methods and be efficiently used in practice for more complex data and statistical modelling purposes.
Reactions are currently unavailable