Indiana University
University Information Technology Services
  
What are archived documents?
Login>>
Login

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.

Close

How do I load data into Mplus?

In Mplus, a data set can contain a maximum of 500 variables; there is no limit on the number of observations. Mplus reads ASCII text files delimited by a space, tab, or comma. The following example is a text file delimited with a comma, with file extension .dat  :

1,76,82,158,79,2 2,82,86,168,84,1 3,80,92,172,86,1

Suppose you have data stored in c:\temp\mplus\stat.dat and want to load them into Mplus. First, specify an ASCII text file in the FILE IS option of a DATA command. Enclose path and file name with quotation marks: DATA: FILE IS "c:\temp\mplus\stat.dat"; FORMAT IS FREE; VARIABLE: NAMES ARE id midterm final sum average grade;

The FORMAT statement describes the format of the data to be read. The text FORMAT IS FREE; is a default option and thus can be omitted. If you have a fixed format rather than delimited formats (FORMAT IS FREE;), include FORTRAN-style formats instead of FREE in the FORMAT IS option. The VARIABLE command describes variables to be read.

For more about statistical and mathematical software, email the UITS Stat/Math Center, visit the center's web page, or phone 812-855-4724 (IUB) or 317-278-4740 (IUPUI). The center is located in Bloomington at 410 N. Park Avenue, and is open for consultation by appointment Monday-Friday 9am-5pm.

This is document azez in domain all.
Last modified on December 18, 2009.

Comments/Questions/Corrections

Use this form to offer suggestions, corrections, and additions to the Knowledge Base. We welcome your input!

If you are affiliated with Indiana University and would like assistance with a specific computing problem, please use the Ask a Consultant form, or contact your campus Support Center.

Contact Information

Note: We will reply to your comment at this address. If your message concerns a problem receiving email, please enter an alternate email address.