handling a lot of variables at the same time and do purely imputation
YushuShi opened this issue · 1 comments
YushuShi commented
Just have two questions:
- Can JointAI package do purely imputation, but no modeling?
- I found it has some difficulty handling a large number of covariates? When I give 50 covariates, it's OK, but when I give more than 100, it says
Error in vapply(x, fun, FUN.VALUE = character(1L), ..., USE.NAMES = TRUE) :
values must be length 1,
but FUN(X[[1]]) result is length 2
In addition: Warning messages:
1: In gsub(paste0("^", clean_lhs, "[[ ]]*"), "", deparse(x, width.cutoff = 500L)) :
argument 'pattern' has length > 1 and only the first element will be used
2: Using formula(x) is deprecated when x is a character vector of length > 1.
Consider formula(paste(x, collapse = " ")) instead.
3: Using formula(x) is deprecated when x is a character vector of length > 1.
Consider formula(paste(x, collapse = " ")) instead.
Thanks a lot!
NErler commented
- You can get multiple imputed datasets from JointAI. To do that, you need to specify the argument
monitor_params(imps = TRUE)
. Then you can use the functionget_MIdat()
. - Theoretically, there is no limit to the number of covariates you can use, but I didn't anticipate such huge formulas and used
deparse
with the maximumwidth.cutoff = 500
in several places. I expect that the issue arises because your formula is longer than that. I'll see what I can do about fixing this.