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 just stumbled across this in one of my projects. The problem appears to be the type argument passed to mitml::jomoImpute. In mice::sampler line 47type is set to the row of the predictor matrix corresponding to the block (and therefore a vector of 0/1).
However, ?mitml::jomoImpute states the following
The type interface is designed to provide quick-and-easy imputations using jomo.
The type argument must be an integer vector denoting the role of each variable in
the imputation model:
1: target variables containing missing data
2: predictors with fixed effect on all targets (completely observed)
3: predictors with random effect on all targets (completely observed)
-1: grouping variable within which the imputation is run separately
-2: cluster indicator variable
0: variables not featured in the model
A quick and hacky fix that avoids that problem is therefore running
type<-2*typetype[blocks[[h]]] <-1
within the mice:::sampler before the call to mice.impute.jomoImpute but ideally this could be addressed within mice.impute.jomoImpute itself.
In connection to #378 I came across the following error
Created on 2021-04-02 by the reprex package (v1.0.0)
The error occurs when imputing
chl
. It is not quite clear whyjomoImpute()
says that this variable has no missing data.The text was updated successfully, but these errors were encountered: