Page 2 of 2

Re: Don't have MLWin

Posted: Tue Apr 09, 2013 10:31 am
by ChrisCharlton
Realcom assumes that the data is tab delimited and that the first three lines don't have extra tabs. If you are familiar with Matlab the data is read in as follows:

Code: Select all

[a]=importdata(Inputfile, '\t', 4);
eval(['c_nimpute=' a.textdata{1}]);
eval(['c_naux=' a.textdata{2}]);
eval(['c_vartype=[' a.textdata{3} ']']);
c_data=a.data;
c_varnames=a.colheaders;

Re: Don't have MLWin

Posted: Wed Apr 10, 2013 8:42 pm
by shakespeare
I need to know what kind of marker is used at the end of each record. Is it a carriage return or something else?

Re: Don't have MLWin

Posted: Wed Apr 10, 2013 10:21 pm
by ChrisCharlton
We use a newline character (\n) when writing from MLwiN, however I expect that the importdata Matlab function (http://www.mathworks.co.uk/help/matlab/ ... tdata.html) which we use should understand carriage returns (\r) as well.

Re: Don't have MLWin

Posted: Thu Apr 11, 2013 3:08 pm
by shakespeare
Ok. I programmeed SAS to produce to proper type of file for input into REALCOM. I tried running it with my missing value (9999) and, as before, only got imputations for my continuous variables. I changed my missing value to the default (-9.999e29) and the categorical variables imputed as well. However, the imputations look funny. My categorical variables are all binary (0/1) except for one that is coded 1, 2, 3, 4. The imputations for the categorical variables are all non-integers, and in some cases are negative. I can't figure out if that's because I ran a very short set iterations (100) for testing purposes, or if there's a bigger problem. I'm wondering if I ran several thousand iterations if I'd get interger values that are similar to the non-missing values.

Re: Don't have MLWin

Posted: Thu Apr 11, 2013 4:31 pm
by ChrisCharlton
I don't think that the number of iterations should cause this behaviour. If you can send an example file that exhibits this to Professor Goldstein then then he may be able to get to the bottom of what's going on here.