[R] Changing model parameters in the mi package

Andrew Miles rstuff.miles at gmail.com
Wed Jul 14 16:33:11 CEST 2010


I am trying to use the mi package to impute data, but am running into  
problems with the functions it calls.

For instance, I am trying to impute a categorical variable called  
"min.func."  The mi() function calls the mi.categorical() function to  
deal with this variable, which in turn calls the nnet.default()  
function, and passes it a fixed parameter MaxNWts=1500.  However, as  
you can see below, the min.func variable needs a higher threshold than  
1500.  Is there a way that I can change the MaxNWts parameter that is  
being sent to nnet.default()?  I've investigated the mi() and  
mi.info() functions and cannot see a way.

Thanks for your help!  Error message and system info below:

Beginning Multiple Imputation ( Wed Jul 14 10:25:06 2010 ):
Iteration 1
  Imputation 1 : min.func*

Error while imputing variable: min.func , model: mi.categorical
  Error in nnet.default(X, Y, w, mask = mask, size = 0, skip = TRUE,  
softmax = TRUE,  :
   too many (2608) weights

System is Mac OS X 10.5.8, R version 2.9.2


Andrew Miles



More information about the R-help mailing list