How to constrain imputed values PreviousNext
Mplus Discussion > Missing Data Modeling >
Message/Author
 Anders Albrechtsen posted on Wednesday, January 03, 2018 - 12:22 am
I have a dataset with missing values on both x and y side. All values are ordinally scaled (0-11).

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 0-11 range? I'm ok with non-integer imputed values since I assume the variables are continuous.

Thanks in advance.

Best regards,
Anders
 Tihomir Asparouhov posted on Wednesday, January 03, 2018 - 4:00 pm
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(0-11);
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.
 Anders Albrechtsen posted on Thursday, January 04, 2018 - 12:36 am
Thank you very much.

This is exactly what I was looking for!

BR
Anders
 Anders Albrechtsen posted on Thursday, January 04, 2018 - 7:41 am
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
 Bengt O. Muthen posted on Thursday, January 04, 2018 - 4:29 pm
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.
 Anders Albrechtsen posted on Friday, January 05, 2018 - 2:08 am
Ah I see.

Thank you for the clarification.
 Anders Albrechtsen posted on Friday, January 05, 2018 - 5:05 am
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_1-q11_8 q12_1-q12_12
q13 q14_1-q14_5 q15-q17;
values = q10(0-11) q11_1-q11_8(0-11) q12_1-q12_12(0-11)
q13(0-11) q14_1-q14_5(0-11) q15-q17(0-11);
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
 Bengt O. Muthen posted on Friday, January 05, 2018 - 10:50 am
Delete the Data Imputation part - just use Type = Basic.
 Anders Albrechtsen posted on Monday, January 08, 2018 - 12:11 am
Thank you. That did the trick.

BR
Anders
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: