In Stata, how do I retrieve a saved data set?

In Stata, you retrieve a saved data set with the use command. You need to specify the path and data file name. For example, if you wish to retrieve a file called data1.dta from your flash drive assigned to E:, use the following command:

  use e:\data1

You may ignore the default extension .dta. If you use a different extension, you must include it as part of the file name.

Stata can handle only a single data set at a time in the memory. When a data set already exists in the memory, you must clear the memory and make room for the new data set by adding the clear option, as follows:

  use e:\data2, clear

If you have questions about using statistical and mathematical software at Indiana University, contact Research Analytics. Research Analytics is located on the IU Bloomington campus at Woodburn Hall 200; staff are available for consultation Monday-Friday 9am-noon and by appointment.

For details about availability of UITS services during winter break, see UITS winter break support hours.

This is document afrj in the Knowledge Base.
Last modified on 2015-05-20 00:00:00.

Contact us

For help or to comment, email the UITS Support Center.