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 

Back to top 