Using mice() only on a desired value of NA in specific column

Hi everyone, I need a little bit of help in handling my data missing values.
This is my data situation:

ID         AGE GENDER A1 A2 B1 B2 B3 B4 
Gray       22     F    1  2  3  2  2  1 
Red        21     F    2                  
Blue       22     M    1  1  3        2

Blue only has two missing values in B variable so I can compute it thanks to imputation mean (I'm using mice) but all Red values are missing in Bs and I don't want to do so.
What I'd like to ask r is to use mice if only two values or less in Bs variable are missing and to substitute the NA only for B1, B2, B3 and B4 (it should not handle As NA), otherwise, if it is more then two then it's fine to jus leave them blank.
This is how I'm using mice right now:

mice(data, m=5,maxit=50,meth='cart',seed=500)
If someone could explain to me how to do so I'll be very gretuful!
Thank you and have a nice day

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.