Read in imputed Data sets

Welcome to the forum for MLwiN users. Feel free to post your question about MLwiN software here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Remember to check out our extensive software FAQs which may answer your question: http://www.bristol.ac.uk/cmm/software/s ... port-faqs/
Post Reply
LinusTrenker
Posts: 2
Joined: Sat Jan 17, 2015 2:13 pm

Read in imputed Data sets

Post by LinusTrenker »

Hey guys,

I have a problem reading in my imputed data sets. The multiple imputation was done in R with the package MICE. In order to read in the multiple imputed data I saved all data.frames as separate files named imputeiter100.dta, imputeiter200.dta, ...

Then I generated a file impvals.txt in the same directory. It has the following structure:
imputed_variable_name_1<WHITESPACE>imputed_variable_name_2<WHITESPACE> ... <NEWLINE>
Number_of_cases<NEWLINE>
Number_of_imputed_datasets<NEWLINE>
imputed_dataset_name_1<TAB>imputed_dataset_name_2<TAB> ... <NEWLINE>

When I try to read this file in MLWin(2.27) with the IRETRieve command, MLWin crashes without any error message.

Any Ideas?

Best regards
Linus
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: Read in imputed Data sets

Post by ChrisCharlton »

The format of your impvals.txt file looks correct, however MLwiN expects the imputed datasets to be in the form of tab-delimited text files rather than Stata .dta files. Could you try again after converting the files to this format and see whether you have more success?
LinusTrenker
Posts: 2
Joined: Sat Jan 17, 2015 2:13 pm

Re: Read in imputed Data sets

Post by LinusTrenker »

Hey Chris,

thanks for your reply. This solved my problem. In fact I tried to read in dta files rather than fixed format txt files. With txt files it worked perfectly.
Post Reply