### Mplus FAQ Common questions about Mplus

Is an Mplus .inp program case sensitive?

No. You can type commands in upper and lower case, e.g.,

Data:
File is hsb2.dat ;

is the same as

DATA:
FILE IS hsb2.dat ;

Can a command span over more than one line?

Yes, for example these two commands are identical.

Variable:
Names = id female race ses schtyp prog read write math science socst;

and

Variable:
Names = id female race ses schtyp prog
read write math science socst;

How do I indicate a comment?

A comment is indicated with !

The rest of the line after the ! is commented, for example

Variable:
Names = id female race ses schtyp prog read write math; ! read the variables

or to comment out some

Variable:
Names = id female race ses schtyp prog read write math; ! science socst;

Do I have to include the full path when pointing to a data file?

It depends.  If you are reading a data file that is in the same folder (directory) as the input file, you do NOT need to include the full path when pointing to a raw data file.  For example, if your data file is in c:\mydata\test.dat , and your input file is c:\mydata\myinput.inp, then you can read the raw data file like this.

Data:
File is test.dat ;

If your input file was in a different folder, then you would need to specify the full path, for example.

Data:
File is c:\mydata\test.dat ;

Does the order of variables matter on NAMES= ?

Yes, this represents the order of the variables in your raw data file, like on an input statement in other stat packages.  So, in the example

Variable:
Names = id female race ses;

It implies that the variables in the data file are id then female then race then ses .

Does the order of variables matter on USEVARIABLES?

No, this is simply a list of variables to be used for the analysis (kind of like a keep statement). By the way, this can be abbreviated to USEVAR . Here is an example.

Variable:
Names = id female race ses;
usevar = female ses race; 

And in this analysis only female, ses and race will be included.

Can commands be abbreviated?

Yes, as you saw in the example above,

Can Mplus handle user missing values (numeric missing values)?

Yes, with the Missing are command.

You can give all variables the same missing value, e.g., Missing are all (-999999999) ;

You can give different values for different variables, e.g., Missing are x1 x2  (-1) y1 y2 (-5) ;

You can even have multiple missing values for a variable, e.g., Missing are x1 x2  (-1, -2) y1 y2 (-5, -9) ;

Can Mplus handle periods (dots) as missing values?

Yes, you can specify Missing are .; and it will understand a . to be a missing value.

What about the is and are and = (equal sign).  Are they all the same?

Yes, they are all the same. For example, the following statements all have the same effect.

Variable:
Names are id female race ses

or

Variable:
Names is id female race ses

or

Variable:
Names = id female race ses

The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.