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

st: RE: Top ten tricks [was: RE: RE: RE: RE: RE: RE: RE: Using postfile]

From   "Peter Jepsen" <>
To   <>
Subject   st: RE: Top ten tricks [was: RE: RE: RE: RE: RE: RE: RE: Using postfile]
Date   Fri, 21 May 2004 15:38:25 +0200

I'd add the following nominees:

1. -stset-'.
2. -return list-. Or rather, all the good things stored in r().
3. _n & _N, although they're not commands.


-----Original Message-----
[] On Behalf Of Nick Cox
Sent: 21. maj 2004 15:02
Subject: st: Top ten tricks [was: RE: RE: RE: RE: RE: RE: RE: Using

Thanks very much. Being a bit smart with this stuff depends on smarter
people having written it. 

The deeper lesson is the extraordinary leverage afforded by -by:-. 

That leads to me to ask a question: which would we nominate as (say) the top
ten tricks which are the deepest and most Stataish features in what we use?
What is _both_ simple _and_ deep? 
What leads to great results with at most a few lines of code? 

Let me explain what I mean. 

Something like
-generate- is something utterly fundamental and extraordinarily useful and
Stata could not be imagined without such a commnand. But the main idea is a
standard one. The same could be said about say -if-. 

Commands like -regress- or -stcox- (no
relation) are very well done, and key tools in the toolkit: but the
greatness of the commands matches the greatness of the statistical idea and
the associated machinery. 

On the other hand, -by:- still gives many pleasant surprises once you see
how to use it. 
The more you use, the more you admire it. 

I'd nominate straight away 

1. -by:-. 

2. -foreach- or -forval- with varlists or numlists. 

3. -merge-. I rarely use it but -merge-masters have real leverage in file

4. -assert-. My candidate for the most
underestimated command in Stata (second is -count-).  

5. -reshape-. 

Any other nominations? 


Amani Siyam 

<nice message>  

*   For searches and help try:

*   For searches and help try:

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