Closed vkhodygo closed 1 year ago
Running code
library("mice") expr <- expression((wgt - 40) * (hc - 50)) boys$wgt.hc <- with(boys, eval(expr)) meth <- make.method(boys) meth["wgt.hc"] <- paste("~I(", expr, ")", sep = "") meth["bmi"] <- "" pred <- make.predictorMatrix(boys) pred[c("wgt", "hc"), "wgt.hc"] <- 0 imp.int <- mice(boys, m = 1, meth = meth, pred = pred, print = FALSE, seed = 62587, maxit = 10) vis <- c("hgt", "wgt", "hc", "wgt.hc", "gen", "phb", "tv", "reg") expr <- expression((wgt - 40) * (hc - 50)) boys$wgt.hc <- with(boys, eval(expr)) imp.int2 <- mice(boys, m = 1, maxit = 1, visitSequence = vis, meth = imp.int$meth, pred = imp.int$pred, seed = 23390)
from Section 6.5.1 of the book results in the following error:
6.5.1
Error in maxit == 1L && !is.null(user.visitSequence) && user.visitSequence == : 'length = 8' in coercion to 'logical(1)'
This is caused by changes introduced in R4.3.0. The PR should resolve this.
R4.3.0
@hanneoberman If you're happy with the code could you please merge it?
Running code
from Section
6.5.1
of the book results in the following error:This is caused by changes introduced in
R4.3.0
. The PR should resolve this.