Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE : st: RE : st: Do-file no result, command line OK


From   <[email protected]>
To   <[email protected]>
Subject   st: RE : st: RE : st: Do-file no result, command line OK
Date   Tue, 29 Mar 2011 13:53:05 +0100

Thanks for your answer. To be more precise, my concern is that in the best case not all the changes have been made and in the worst case no change at all has been made. Indeed, I found many observations just by skimming through the data with some dot(".") although they should all have been uniformly removed by the command line:

replace companyname_short=subinstr(companyname,"."," ",.)

best,

Xavier


-------- Message d'origine--------
De: [email protected] de la part de Nick Cox
Date: mar. 29/03/2011 13:39
À: [email protected]
Objet : Re: st: RE : st: Do-file no result, command line OK
 
I don't know how looking in the Data Editor can convince you that
nothing has changed among 5 million observations. Did you check all of
them?

The only convincing evidence that nothing has changed is that you
clone the variable, issue the -replace- command on the clone, and then
compare with the original.

Nick

On Tue, Mar 29, 2011 at 1:31 PM,  <[email protected]> wrote:

> Thanks Uli, but no -preserve- nor -restore-. Quite weird indeed.

Ulrich Kohler

> This sounds pretty weird.
>
> I sometimes experience something like this in Do-Files with a
> -preserve-/-restore- part in it. When running those parts of the Do-File
> that contain the -preserve- command but does not contain the -restore-
> command, the end of the Do-file brings you back to the preserved data
> set.

> [email protected]:

>> I am running a do-file on a large dataset (4'999'453 observations). One of my command is:
>>
>> replace companyname_short=subinstr(companyname,"."," ",.)
>>
>> That is, I replace the dot in the variable "companyname" by a blank in the variable "companyname_short". When I run the do-file, stata tells me that x hundred thousands of "real changes" have been made, but actually nothing have changed in my dataset when I open the data viewer. However, when I copy and past the command from the do-file into the command line, everything works fine.
>>
>> Any idea to make it run smoothly with the do-file?

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer

<<winmail.dat>>



© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index