Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: Accessing the number of changes made by a "replace" command


From   "David Fisher" <[email protected]>
To   [email protected]
Subject   RE: st: RE: Accessing the number of changes made by a "replace" command
Date   Fri, 18 Mar 2005 10:38:23 +0000

Oops. Yes, that would do it. That was embarrassingly simple. Thanks!
Also, thankyou for the "linkplot" command -- it's pretty much exactly what I needed, and I've managed to get round the few things that weren't quite right.



From: "Nick Cox" <[email protected]>
Reply-To: [email protected]
To: <[email protected]>
Subject: st: RE: Accessing the number of changes made by a "replace" command
Date: Fri, 18 Mar 2005 10:18:21 -0000

I think you need to implement this yourself.
If you have a variable holding
the previous values, then after each change
you compare latest version with the previous values;
exit if no differences; otherwise replace
previous with latest, and loop again.

Nick
[email protected]

David Fisher

> I am attempting to create a "while" loop that executes, amongst other
> things, a "replace" command on a particular variable. I
> would like this
> loop to continue until the "replace" command cannot make any
> more changes to
> the data. In order to do this I would like to be able to
> access the number
> of (real) changes made by the "replace" command, so that I
> can say something
> like "loop while (number of real changes)!=0". Is there a
> way to do this in
> Stata? I thought there might be an underscore variable that
> would do this,
> but I can't find one.

*
* 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