Do not estimate select items across c... PreviousNext
Mplus Discussion > Latent Variable Mixture Modeling >
Message/Author
 Dr. Jamie Tock posted on Wednesday, February 21, 2018 - 7:38 am
I am attempting to use a LCA with knownclass and categorical variables to estimate an IRT model with vertical equating. The following syntax achieves that goal, however, I would like mplus to NOT estimate the items with asterisks next to them in the syntax below for certain groups. In other words, I would like i1 to be constrained to equality across groups 1,3, and 4, but to not be estimated for group 2. Constraining the threshold and loading to 0 does not appear to work because a threshold of 0 is meaningful in the IRT framework.


VARIABLE:
Names are i1-i61 year;
usevariables are i1-i6;
categorical are i1-i6;
classes = g(4);
knownclass = g (year = 1 year = 2 year = 3 year = 4);

MISSING=ALL (8);

ANALYSIS:
Iterations = 20000;
Estimator = ML;
type = mixture;
ALGORITHM=INTEGRATION;
coverage = .000001;

MODEL:
%overall%
F1 BY i1-i6*;
f1@1;

%g#1%

%g#2%
i1*;i4*;i6*;

%g#3%
i2* i5*;

%g#4%
 Bengt O. Muthen posted on Wednesday, February 21, 2018 - 4:51 pm
Perhaps by saying "not be estimated for group 2" you would like those items to be missing in group 2 so that their information in that group is not used? If so, you can give them a missing data flag in that group.
 Jamie Tock posted on Thursday, February 22, 2018 - 6:57 am
I would like that their information is not used but I am not sure how I would use a missing data flag in the multiple group situation. Typically, I could say: Missing = i1(-99)
However, this would refer to i1 in all groups. I would like the data to be declared missing for only one of the four groups (i.e. for item 1 in group 2).
 Jamie Tock posted on Thursday, February 22, 2018 - 7:10 am
Additionally, is there a way to do a multiple group analysis and estimate an item for one group but not others? For example, if I wanted to estimate item i1 for groups 1, 3, and 4, but not include i1 in group 2. Setting the item thresholds and loadings to 0 will not work because 0 is meaningful in the IRT context.

MODEL:
%overall%
F1 BY i1-i6*;
f1@1;

%g#1%

%g#2%
(do not include i1 for this group)

%g#3%

%g#4%
 Bengt O. Muthen posted on Thursday, February 22, 2018 - 4:18 pm
6:57 post:

Very easy - give the -99 values for these variables in just that one group.

7:10 post:

That's more involved but can be done - see the FAQ on our website:

Different number of variables in different groups
 Jamie Tock posted on Friday, February 23, 2018 - 8:58 am
Thank you that is very helpful but how would I do this part:

For a dependent variable, it is best to create a missing value flag for that variable in the group that does not have that variable using the DEFINE command.

Basically, how would I define a variable so that it applies to only one item (i1) to only group 2 (%g#2% ) but not to that item (i1) for the other groups?

How would I create a missing value flag using the DEFINE command?

Data: File is syntax3.csv
Define: ?????

MODEL:
%overall%
F1 BY i1-i6*;
f1@1;

%g#1%

%g#2%
(do not include i1 for this group)

%g#3%

%g#4%
 Bengt O. Muthen posted on Friday, February 23, 2018 - 4:19 pm
Actually, to simplify, don't do it in Define - instead assign the -99 values using some other software before you run Mplus.
 Jamie Tock posted on Monday, February 26, 2018 - 9:59 am
I agree that that is an alternative solution and I have done that, but I also think it would be useful to use the define command approach for the purposes I need.

I have tried the following command to try to get all values for variable i1 in group 2 to equal 99 (the missing value), but it did not appear work. Do you have a suggestion on how I could do this?

Define: IF (g#2==i1) THEN i1 = 99;
 Bengt O. Muthen posted on Monday, February 26, 2018 - 11:19 am
You can use the _Missing option in the Define command. E.g.

If(group eq 2) then i1 = _Missing;

which sets the variable to missing internally.

If you save the data using the Savedata command you will see that all the missing data including these generated missing data have been given * as the missing data flag.
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: