Re: [R] Multiple imputation on subgroups

2011-10-10 Thread Weidong Gu
An ad-hoc method is to impute missing scores of the whole data set including subgroup1, then change imputed scores in subgroup1 into NA. Weidong Gu On Mon, Oct 10, 2011 at 5:35 AM, Sarah wrote: > Dear R-users, > > I want to multiple impute missing scores, but only for a few subgroups in my > dat

[R] Multiple imputation on subgroups

2011-10-10 Thread Sarah
Dear R-users, I want to multiple impute missing scores, but only for a few subgroups in my data (variable 'subgroups': only impute for subgroups 2 and 3). Does anyone knows how to do this in MICE? This is my script for the multiple imputation: imp <- mice(data, m=20, predictorMatrix=pred, post=p