ARCHIVED: In Stata, how do I save a data set?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

The save command will save a file in Stata format. You may add a specific pathname to save the file somewhere other than in the default directory.

The following command stores the current data set in memory into a file data1 in the temp directory of the C: drive (hard disk):

  save c:\temp\data1

If a file by that name already exists, you must include the replace option to overwrite the previous version:

  save c:\temp\data1, replace

If you have questions about using statistical and mathematical software at Indiana University, contact the UITS Research Applications and Deep Learning team.

This is document afri in the Knowledge Base.
Last modified on 2023-05-09 14:40:01.