Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Making changes to Two Stata files at once


From   "White, Justin" <[email protected]>
To   <[email protected]>
Subject   st: RE: Making changes to Two Stata files at once
Date   Mon, 18 Sep 2006 15:05:28 -0400

I am not sure if this helps, but have you considered appending both
datasets before you make any changes.  For instance, let's say there are
two data sets you are dealing with.  Without know if the two data sets
have the same variables or not, you may consider merging both sets into
one and then go through your "changes".

You can also approach it this way.  Make changes to one.  Then save the
file as a Stata data file.  Then open the other file and make those
changes.  Then merge/append the two files and if you don't need one of
the files anymore, you can use the 'erase' command and it will delete
the file you don't need.


Justin White

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Rachel S
Sent: Monday, September 18, 2006 2:36 PM
To: statalist
Subject: st: Making changes to Two Stata files at once

I'd like to drop some observations and make other changes to a file
and see how this impact some of my results.  The issue is that, once I
do this, I will probably end up adding variables and making other
changes to this file.  If I decide that I'd rather not drop the
variables and then go back to the old orphaned file I will have to go
back and make all these changes again.

Is there any way I can have Stata apply commands to two files at a
time? If not, is there a good way to handle this issue besides logging
all my commands and manually re-entering them?  (Sure, I can drop
observations only when I'm finished making all other changes to the
file, but in practice, it's hard to know when I'm truly "finished.")

Thanks very much,
Rachel
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index