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]

Re: st: Wishlist for Stata 13


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Wishlist for Stata 13
Date   Wed, 30 Jan 2013 13:42:50 +0000

First, commenting on -egen-.

It strikes me that any program would have to work hard to cope with
the difference between (e.g.)

1. invocations of -min()-, -max()-, -sum()-  and -egen-'s functions
-min()-, -max()-, -sum()- (the latter now undocumented, but still
works)

2. any similar clashes between Stata function names and user-written
-egen- function names (nothing rules them out)

These clashes might not arise often -- but they are certainly
possible. When they happened they could be hard to spot  and could
have very bad consequences, notably that valuable data were destroyed.
As we all know, the whole point of separating -generate- and -replace-
is to support data integrity. What StataCorp (CRC, historically) split
asunder cannot easily be re-united.

So, a way forward might be to make -somenewname- a prefix command

somenewname: gen ....
somenewname: replace
somenewname: egen

so that any such statement would trigger -note- production as a
side-effect for the variable being produced or changed.

2. Commenting on -by:-

I haven't tried, but that sounds soluble.

Nick

On Wed, Jan 30, 2013 at 1:17 PM, Richard Goldstein
<[email protected]> wrote:

> a big (to me) caveat to the -defv- solution (and also to Maarten Buis'
> solution from today): it does not work with -egen- and it does not work
> with -by-
>
> I support request #1
>
> Rich
>
> On 1/30/13 4:04 AM, Nick Cox wrote:
>> #1 was implemented as a user-written -defv- in 1997:
>>
>> STB-51  dm50.1  . . . . . . . . . . . . . . . . . . . . . . . . Update to defv
>>         (help defv if installed)  . . . . . . . . . . . . . . .  J. R. Gleason
>>         9/99    p.2; STB Reprints Vol 9, pp.14--15
>>         updated to Stata 6 and improved
>>
>> STB-40  dm50  . . . . . . . Defining variables and recording their definitions
>>         (help defv if installed)  . . . . . . . . . . . . . . .  J. R. Gleason
>>         11/97   pp.9--10; STB Reprints Vol 7, pp.48--49
>>         command to define a variable and document the operation it performs
>>
>> Nick
>>
>> On Wed, Jan 30, 2013 at 6:23 AM, Chamara Anuranga <[email protected]> wrote:
>>
>>> 1. I prefer when generate or replace variable on the dataset the
>>> command attach as a different type of note to the dataset. This option
>>> should be set off and on in order to reduce the file size.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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