Bookmark and Share

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

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

Re: st: How to set a year index?

From   Oliver Jones <>
Subject   Re: st: How to set a year index?
Date   Fri, 20 May 2011 17:46:41 +0200

Am 20.05.2011 17:24, schrieb Nick Cox:
We're talking style, and long ago wise people warned de gustibus non est disputandum.

But, sincerely...

How does the extra code make it easier to understand? The presumption is that a reader needs the clue

local mean = r(mean)

to realise that r(mean) contains the mean. Really???

There is a huge difference between your example here and my code!
The "mean" in the case at hand is just the single value of price in the year 2005
which serves as the base value and thus using the scalar base_value makes this very clear!

Reminds me of those places that give you warnings about hot drinks being hot. Also, the price is confusion for anyone who has no idea what a local is. So, the target readership is: people who know about locals, but not about means.

I hope you are just a funny guy (i.e. a person with a good sense of humour) and not trying
to make fun of me...

The -scalar- is no more necessary than the -local-.

The scalar solves the precision problem. I never said it is necessary, just in my opinion
useful to clarify the code.

I agree: -meanonly- is likely to have a trivial efficiency effect here. But it's worth learning about, and telling other people about, for problems where it matters.

As I said, I completely agree with you on this point.


*   For searches and help try:

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