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.

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

  • Fill out this form to submit your issue to the UITS Support Center.
  • Please note that you must be affiliated with Indiana University to receive support.
  • All fields are required.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.

  • Fill out this form to submit your comment to the IU Knowledge Base.
  • If you are affiliated with Indiana University and need help with a computing problem, please use the I need help with a computing problem section above, or contact your campus Support Center.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.