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

RE: st: Tests on sums of coefficients?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: Tests on sums of coefficients?
Date   Fri, 16 Jul 2004 17:06:41 +0100

I don't know about "must be": "should be", 
perhaps, but then again "should not be", 
perhaps. 

It is always tricky even for StataCorp to 
know what should be an FAQ. The difference 
between copying and evaluating is quite explicit 
in [U] 21.3.4; this is presumably where most 
Stata users first learn about macros. Perhaps 
it needs a stronger warning: pay attention, as
otherwise this really will bite you!

In addition, the limits on various operations are 
at [R] limits and in the corresponding on-line help. 

So all this is documented fully. 

The difficult trade-off here is based on some
elementary but also fundamental facts: 

1. Most people, naturally, don't absorb 
all the information they need from a single 
reading. So, it helps to have multiple 
sources of information and some repetition. 

2. But given the massive manuals, 
on-line help, FAQs, etc., etc. there is 
also, in an equally obvious way, already 
too much for many people to (want to) scan 
for an answer. (A minority use of Statalist 
seems close to "I can't be bothered to read 
the manuals, so can somebody give up their 
spare time to do my work for me?".) 

The FAQs grew up as extras, plugging gaps 
in the documentation, expanding on tricky 
points, etc. They should not be used 
just to repeat information. That just 
bloats the available materials. 

Another basic tip is just to re-read 
the manuals, cover to cover, from time
to time. (You are allowed to skip and 
skim, when you know that a command is of 
no present interest to you.) 
You may blench at the time investment, but 
if you use Stata almost every day, it is 
likely to be repaid. 

Nick 
[email protected] 

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Michael S.
> Hanson
> Sent: 16 July 2004 15:11
> To: [email protected]
> Subject: Re: st: Tests on sums of coefficients?
> 
> 
> On Jul 12, 2004, at 2:51 PM, Nick Cox wrote:
> 
> > Be very careful here. As numerous threads bear
> > witness, looping around
> >
> > local testsum = "`testsum'+`var'"
> >
> > will truncate your macro at some limit. It
> > is much safer to copy, not evaluate:
> >
> > local testsum "`testsum'+`var'"
> 
> 	Thanks for that suggestion -- it might help explain a 
> problem I have 
> seen cropping up with a similar construct.
> 
> 	I had searched the archive for similar questions before 
> posting the 
> original question, but found none like you refer to.  I guess I had 
> been looking the wrong way....
> 
> 	Thanks again for taking the time to respond to what 
> must be a FAQ.

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