You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when I use the "formulas" argument of "mice", then the first predictor gets lost along the way. I think it happens within mice:::sampler.univ. My formula is "X ~ 0 + Y", which is updated to "X ~ Y - 1" in mice:::sampler.univ. Then the design matrix x is obtained, which has one column containing the values of Y. So far, so good; but then the first and only column is removed:
x <- x[, -1L, drop = FALSE]
Thus Y is not used to predict X.
The issue does not occur when I use the "predictorMatrix" argument to specify the same imputation model.
Hello,
I noticed that when I use the "formulas" argument of "mice", then the first predictor gets lost along the way. I think it happens within mice:::sampler.univ. My formula is "X ~ 0 + Y", which is updated to "X ~ Y - 1" in mice:::sampler.univ. Then the design matrix x is obtained, which has one column containing the values of Y. So far, so good; but then the first and only column is removed:
x <- x[, -1L, drop = FALSE]
Thus Y is not used to predict X.
The issue does not occur when I use the "predictorMatrix" argument to specify the same imputation model.
Here is an example illustrating the problem:
Example_for_GitHub.txt
I would very much appreciate if you could have a look at the issue!
The text was updated successfully, but these errors were encountered: