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
 Nicole Watkins posted on Monday, October 08, 2018 - 9:32 am
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.
 Tihomir Asparouhov posted on Monday, October 08, 2018 - 10:14 am
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.
 Nicole Watkins posted on Monday, October 08, 2018 - 10:22 am
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, time-varying covariate with a continuous outcome variable. My dichotomous time-varying 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.
 Tihomir Asparouhov posted on Monday, October 08, 2018 - 10:58 am
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;
 Nicole Watkins posted on Monday, October 08, 2018 - 11:05 am
Thank you, Tihomir. What does the -30 stand for? Does that number ever change?
 Bengt O. Muthen posted on Monday, October 08, 2018 - 11:15 am
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.
 Nicole Watkins posted on Monday, October 08, 2018 - 11:25 am
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
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: