|
|
Imputation of Multilevel Data |
|
Message/Author |
|
|
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; between = nostudcl aa_berer; missing = all(-99999); DEFINE: ANALYSIS: estimator = bayes; type = twolevel; bseed = 72114; bconvergence = .01; DATA IMPUTATION: impute = knowkid (c) sexkid (c) langkid (c) ses1 (c) ses2 (c) ses3 (c) ZTJnp10 aa_berer; ndatasets = 20; save = tjimp*.dat; thin = 1000; MODEL: OUTPUT: stdyx; ----- Thanks in advance, Tanja |
|
|
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? Thanks for your patience. Tanja |
|
|
Please send the output where you imputed the data and the output where you are reading the imputed data and your license number to support@statmodel.com. |
|
|
I have struck the same problem as Tanja - using the Bayesian estimator to do H0 MI data with a latent variable model (but not multilevel) and obtaining asterisks in the output datasets. I've also tried a very simple model based on observed variables,and lower levels of missing data than originally, but with the same result. The tech 8 output says that the prior is improper for every parameter (44) in the case of the latent variable model. I'd appreciate any advice you can give. |
|
|
The asterisks are missing values. Read the saved data according to the information at the end of the output regarding the saved data sets and use MISSING = *; |
|
|
Thanks Linda. But I would expect the multiple imputation procedure to replace the missing values in the imputed datasets, not perpetuate them. I've run the analysis again and checked that the values missing in the imputed datasets are those which are missing in the original dataset. It seems that no imputation has taken place at all. That's just not right, is it. |
|
|
Please send the output and your license number to support@statmodel.com. You must be overlooking something. |
|
|
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. |
|
Back to top |
|
|