On 10/5/2012 12:06 PM, steve wrote:
> I am trying to impute missing values in my data using aregImpute
> ,cat1 is a three level factor with no "NA" , Brs has about 20%
> missing but the cat1 with no missing is give me problems. The error
> below is what I get when I run it, can someone tell me what I need
> to do to make it work
>
> xtrans <- aregImpute(~cat1+Age+var1+cat2+var3+Brs,n.impute=100,nk=4,
> ,match="closest",pl=F ,data=data3,x=T)
>
> Error in aregImpute(~cat1 + Age + Case.Duration.min + Pt.Gender + ASA
> + : a bootstrap resample had too few unique values of the following
> variables: cat1
So what happens when you drop cat1 from the model? I'm just guessing,
but perhaps there is some confusion about whether cat1 is a continuous
variable or not. You may need to convert it to a factor first and then
run the analysis.
By the way, everything I've read suggests that 5 or 10 is the number of
imputed variables you need. Any reason why you are asking for 100
imputed samples?
Steve Simon,
n...@pmean.com, Standard Disclaimer.
Sign up for the Monthly Mean, the newsletter that
dares to call itself average at
www.pmean.com/news