The Snapshot Function: a headache you will never have again
The snapshot option, new to Stata 11 is the sort of tool researchers dream about. Stated simply, the snapshot command takes a snapshot of your data. It will store a ridiculous number of snapshots (max: 1,000) and can then restore your data to any previous snap-shotted state. To further simplify things, you can give the snapshot eighty character labels to easily differentiate between them.
The command to take a snapshot is snapshot
As previously alluded to, you will want to use the label("[label text]")
option. e.g., snapshot, label ("data before changes")
though you can use snapshot label [snapshot#] "[label text]"
to label a snapshot after you take it
To list your snapshots, the command is snapshot list
. To restore to a snapshot, the command is snapshot restore [snapshot#] where the number is obtained from the list. Finally, you can delete a snapshot using the snapshot erase [snapshot#]
See help snapshot
for more information