Message/Author 


I have a dataset with missing values on both x and y side. All values are ordinally scaled (011). I need to impute 20 datasets for a linear regression analysis plus further analysis in SPSS. The problem is that I cannot use the "Categorical" command which results in meaningless imputed values such as "13.25" etc. which inflate variances. Is there a way to constrain imputed values to the 011 range? I'm ok with noninteger imputed values since I assume the variables are continuous. Thanks in advance. Best regards, Anders 


You should be able to use a script like this DATA: FILE = ex11.6.dat; VARIABLE: NAMES = x1 x2; USEVARIABLES = x1 x2; MISSING = ALL(999); DATA IMPUTATION: IMPUTE = x1(c) x2; NDATASETS = 10; save=a*.dat; ANALYSIS: type=basic; Note that the (c) specification for x1 means that the variable will be treated as categorical. Alternatively you can use a script like this DATA: FILE = ex11.6.dat; VARIABLE: NAMES = x1 x2; USEVARIABLES = x1 x2; MISSING = ALL(999); DATA IMPUTATION: IMPUTE = x1 x2; values = x1(011); NDATASETS = 10; save=a*.dat; ANALYSIS: type=basic; The value command specifies that the allowed values are the integers between 0 to 11. The differences between the two versions is that in the first version the estimated imputation model treats X1 as categorical, while in the second version X1 is treated as continuous and then the values are rounded to the nearest integer from 0 to 11. 


Thank you very much. This is exactly what I was looking for! BR Anders 


Question: When I run this code the output says: Number of missing data patterns : 1 This doesn't seem plausible since the dataset consists of 17,218 cases and 30 dependent variables that all have missing values. SPSS finds 2000+ missing data patterns when I run the missing values analysis. Any advice? Best regards, Anders 


If this is an MI run, the missing data information is for the completed/imputed dataset. If you want the information for the original data, use Type=Basic. 


Ah I see. Thank you for the clarification. 


Tried the following code in the MI run and still get only 1 missing data pattern. analysis: type = basic; bseed = 48932; bconvergence = .05; DATA IMPUTATION: impute = q10 q11_1q11_8 q12_1q12_12 q13 q14_1q14_5 q15q17; values = q10(011) q11_1q11_8(011) q12_1q12_12(011) q13(011) q14_1q14_5(011) q15q17(011); ndatasets=1; save=npt_imp*.dat; It's seems that 1 pattern i referring to the fact that all variables have at least one missing value, i.e. on the variable level. What I'm interested in is the number of missing data patterns on respondent level. Is this possible for MI? I get this figure if I run same model using ML estimation. BR Anders 


Delete the Data Imputation part  just use Type = Basic. 


Thank you. That did the trick. BR Anders 


Dr. Bengt Muthen, Is there a way to tell MPLUS that imputed values can only go from 0 to 1, and not go from 1 to 0? Thank you for your help. 


You can probably try H0 imputation as in user's guide example 11.7 where you specify the imputation model yourself. For example analysis: mediator=observed; model: U2 on U1@30; will yield the deterministic relation that if U1=1 then U2=1. 


Hi Tihomir, I read through the example and I am not exactly sure I understand I apologize. I will explain my specific data a little better to see if that will help. My predictor is a dichotomous, timevarying covariate with a continuous outcome variable. My dichotomous timevarying covariate can only go from 0 to 1 over time, and once it is imputed as a '1', it cannot go back to '0'. Is there a way to specify that? Thanks again, and apologies for seeking clarification. 


The above code is for your binary predictor U  with 5 time point you would have model: U2 on U1@30; U3 on U2@30; U4 on U3@30; U5 on U4@30; 


Thank you, Tihomir. What does the 30 stand for? Does that number ever change? 


Its just a very low logit value to ensure that the probability becomes almost exactly zero. It's a good choice with no need to change it. 


When I do that, all of my estimates are 30 for all parameters. For example, DEP2021 ON DIV2021 is 30.00. DEP should be continuous, and DIV should be the dicotomous predictor. 

Back to top 