Useobservations & invariance tests PreviousNext
Mplus Discussion > Structural Equation Modeling >
Message/Author
 Christoph Herde posted on Monday, January 22, 2018 - 5:50 pm
Dear Dr. Muthen,

I have two questions regarding the useobservations command.

1. I face some problems with specifying the useobservations command correctly if I want to use only a subset of observations based upon multiple variables.
If I want to combine "AND" and "OR" commands here, is the following example correct (i.e., are the brackets correct and a must)?

useobservations = variableA NE 10 AND variableB NE 1 AND variable C EQ 1 AND (variableD EQ 1 OR variableD EQ 2 variableD region EQ 4);

2. Imagine that I want to do invariance tests across 3 groups as defined by 3 different values on a specific variable although, in total, there are 5 different groups/values for this variable.
Is it necessary to restrict the analysis with useobservations first to these 3 groups? Or is it enough to simply specify the 3 groups in the "grouping"?

I highly appreciate all your efforts.
Thanks in advance!
 Thuy Nguyen posted on Tuesday, January 23, 2018 - 5:32 pm
1. The statement is almost correct. You have a few missing OR keywords in the last expression. Is REGION a typo? The following is correct if we remove REGION:

useobservations = variableA NE 10 AND variableB NE 1 AND variable C EQ 1 AND (variableD EQ 1 OR variableD EQ 2 OR variableD EQ 4);

2. You do not need to add a USEOBSERVATIONS statement. You will get a warning for those group values that are not mentioned in the GROUPING option similar to the one below:

Data set contains unknown or missing values for GROUPING,
PATTERN, COHORT, CLUSTER and/or STRATIFICATION variables.
Number of cases with unknown or missing values: 585

You can ignore this warning.
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: