Dear Matt,
I greatly appreciate you response. Below is (essentially) the code I am running (I have a function "mk_imp_df" that subsets the original data frame into a smaller one for the imputations). When I say "essentially" the code I am using, I mean I am omitting a much longer list of variables (~25 variables).
The 'offending' variables are simple continuous variables (floats on the scale from 0->1) and I think they are properly recognized/classified by R...
Please let me know if I can offer any further information!
Thank you again for your time and help!
All the best,
Ryan
nImp=10
ivars <- c('idc', 'iq_5', 'age_yrs', 'sex_int', 'sum_ext_5', 'sum_int_5', 'cbcl_sum_5')
exclude_ivars <- c('idc', 'iq_5')
imp_df <- mk_imp_df(ivars, orig_dataFrame)
#does not work...gives the error code 32
amelia_imp <- amelia(imp_df, m=nImp, idvars=exclude_ivars)
#Works
amelia_imp <- amelia(imp_df, m=nImp, idvars=exclude_ivars, incheck=FALSE)
On Apr 5, 2015, at 4:05 PM, Matt Blackwell <mblackwell@gov.harvard.edu> wrote:
> Hi Ryan,
>
> Hm, odd. Usually this error message happens when you mark a variable as, for example, both "idvars" and "logs" in the same call to amelia. Can you send the code you are using to call amelia? It might help us diagnose the problem.
>
> Cheers,
> Matt
>
> ~~~~~~~~~~~
> Matthew Blackwell
> Assistant Professor of Government
> Harvard University
> url: http://www.mattblackwell.org
>
> On Wed, Apr 1, 2015 at 6:14 AM, Ryan Muetzel <muet0005@gmail.com> wrote:
> Hello,
>
> I have a question about an error code, and whether or not there are options for working around it.
>
> Here is the situation:
>
> I have 4 variables (actually 4 classes of variables) that are linear combinations of each other. Thus, they all cannot be in the imputation model. I am using the "idvars" argument to hold one of these variables out of the imputation process to avoid the "error: inv_sympd(): matrix appears to be singular" message, which I think is related to the fact that these variables are related.
>
> However, when I try to hold one of these variables out of the imputations using the "idvars" argument, I get the message below:
>
> >
> Amelia Error Code: 32
> Transfomations must be mutually exclusive, so one
> variable can only be assigned one transformation. You have the
> same variable designated for two transformations.
> >
>
>
> I have been able to get the imputations to run with the following:
>
> 1.) Running the imputation with only 3 of 4 the variables
> 2.) Running the imputation with 3 of the variables included in the imputation, but one left out using "idvars", and specifying incheck=FALSE
>
> Also, the "idvars" argument works just fine when I hold out two ID variables from the imputation...so it is only failing when I also add one of these 4 correlated variables.
>
> The 4 variables I am speaking of are not necessarily important for the imputation process, but are important for the stats I would like to run down the road on the imputed data (thus I need them in the final imputed data set). When I put all 4 of the variables into the "idvars" argument, I get the error related to the number of excluded variables >> number of variables used for imputation.
>
> Any advice on how to handle this problem is greatly appreciated! Thank you!
>
> All the best regards,
>
> Ryan
>
>
>
>
>
> --
> Amelia mailing list served by HUIT
> [Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia
> More info about Amelia: http://gking.harvard.edu/amelia
> Amelia mailing list
> Amelia@lists.gking.harvard.edu
>
> To unsubscribe from this list or get other information:
>
> https://lists.gking.harvard.edu/mailman/listinfo/amelia
>