University of Southern California

ITS Information Technology Services

A division of the Office of the Chief Information Officer

Using the Stata Data Editor

Entering data into Stata

To enter data directly into Stata, from the Data menu, select Data Editor.

The Data Editor window consists of a grid of rows and columns. The rows correspond to cases, and the columns correspond to variables. Values for variables that Stata has recognized as character data are shown in red. Values for numeric variables are displayed in the data editor in black. Type values into the empty cells and use the tab key to move from one cell to another or the enter (or return) key to move down a line.

Data Editor

Note: If you enter data and then use the mouse or arrow keys to move to the next cell, the data you entered into that cell will NOT be saved.

After you have entered the data and you are ready to exit the Data Editor, click the preserve button to update the backup copy. Stata automatically makes a backup copy of your data when you enter the editor. If you want to cancel the changes that you made and restore the backup copy, click on restore.

To save the data in a Stata data file, close the Data Editor first. Select File , then Save from the Task bar menu. Provide the file and location of your choice and click OK .

Last updated:
December 03, 2008

Stata

The use of all USC computing resources is governed by the USC Computing Policies.