Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

RE: st: What is EGEN_Varname and EGEN_SVarname ?


From   "William Buchanan" <william@williambuchanan.net>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: What is EGEN_Varname and EGEN_SVarname ?
Date   Mon, 30 Jul 2012 09:59:34 -0700

Pradipto,

Another important thing to consider, with regards to Nick's advice, is that
he is basically trying to prevent you from making any changes to your
installed copy of Stata that might "break" it.  If you're changing the
global macros in the egen files then you run the risk of making a change
that prevents egen from working correctly in the future.  If you wanted to
see what those variables are, you could do something like:

viewsource egen.ado (copy the material in the window into the do file editor
or another text editor of your choice)

save your clone as myegen.ado to your personal directory (if you're unsure
where this is you can use the -sysdir- command)

pick the function that you were trying to modify and do the same thing
(e.g., copy the source into a new file myconcat.ado for example).

Now if you make a call to -myegen- make sure that you are using the function
that you've duplicated and you can change the global macros in your
duplicate files.  

The point, however, is to avoid editing any of the files that are native to
the Stata installation unless you're willing to risk making potentially
harmful changes.  Additionally, Nick also provided you with an example
earlier illustrating how you could make the egen subroutine that you were
interested in byable, so you could just start working with that code and
modifying it as necessary.

HTH,
Billy



-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
Sent: Monday, July 30, 2012 9:41 AM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: What is EGEN_Varname and EGEN_SVarname ?

I am mixing explanations and advice on different levels. Feel free to take
the explanations when correct and ignore the advice if it doesn't appeal.
Otherwise I think Maarten's reply to you captures my attitude well. It is a
defining characteristic of a discussion list that people aren't obliged to
offer exactly the kind of support that posters of questions might prefer.

Nick

On Mon, Jul 30, 2012 at 8:48 AM, Pradipto Banerjee
<pradipto.banerjee@adainvestments.com> wrote:
> Nick
>
> I don't understand your line of thought ... you actually want me NOT to
advance my understanding of programming in Stata? Why are some folks allowed
to understand advanced programming and others not?
>
> Sorry to say this, but one huge negative of Stata is that there is so much
undocumented stuff - and for efficient programming we have to repeatedly
rely on email lists like this.
>
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu 
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
> Sent: Saturday, July 28, 2012 9:33 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: Re: st: What is EGEN_Varname and EGEN_SVarname ?
>
> These are names of globals defined in -egen- to communicate between 
> programs, which manifestly can't be done through locals, apart from 
> using non-documented features. If you're following my earlier advice 
> you will leave them in peace.
>
> Nick
>
> On 27 Jul 2012, at 16:03, Pradipto Banerjee 
> <pradipto.banerjee@adainvestments.com
>  > wrote:
>
>> I noticed some of the codes, e.g. _ggroup2 use EGEN_Varname and 
>> EGEN_SVarname and recently one of the codes shared by Nick (called
>> ereplace) use these. What is EGEN_Varname and EGEN_SVarname ?
> *
*
*   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/

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index