Hello, I have tried to make a multilevel imputation of missing data using Bayesian estimation. It does result in 20 imputed data files indeed, but I am not sure whether I have done it correctly, as the message "Unexpected end of file reached in data file" appears when I try to use these imputed data files. Here's the syntax: ---- [...] usevar = ZTJnp10 !cont. IV, level 1 nostudcl !cont. IV, level 2 aa_berer !cont. IV, level 2 knowkid !cont. IV, level 1 sexkid !cat. IV, level 1 langkid !cat. IV, level 1 ses1 !cat. IV, level 1 ses2 !cat. IV, level 1 ses3 !cat. IV, level 1 l_kog_5; !cont. DV
idvariable = id;
cluster = classno;
within = knowkid sexkid langkid ses1 ses2 ses3 ZTJnp10;
The variables in the imputed data sets may not contain the same variables in the same order as the original data set. The order of the variables and the format of the imputed data sets is given at the end of the output where the data sets are imputed.
Thanks, Linda, this helps already -- indeed, that was one of the problem.
However, now a new problem has occurred: apparently, the imputed files contain missing values, indicated by an asterisk (actually, I had assumed that the use of MI is to replace these missings?). I get the error message that I have variation within clusters at the between-level, which, in the past, was usually the case when the data was not read properly. As the original format was 15.5, whereas an asterisk is rather of a format 1.0. Could this be the problem, and if so, what syntax command will solve it?
Oh dear, I'm sorry, Linda. Yes, you're quite right. Looking at Example 11.7 in the manual, I was led to think that, when using the H0 method, I didn't need to use the impute= subcommand, but that imputed values would automatically be saved for all the variables in the model.
When I added that subcommand, all worked as it should.
Thanks for your comment, which led me to consider that option, and for your very prompt responses.