Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: My last word on strange world


From   Johannes Geyer <[email protected]>
To   [email protected]
Subject   Re: st: My last word on strange world
Date   Thu, 10 Jan 2008 16:28:05 +0100

> I'm a bit confused.  Why is that '.' has a value in gen, egen and 
> replace but the maximum value returned by su is not '.'? Surely this is 
> inconsistent?
> Simon

it is not -gen-, -sum- nor -egen- it is the -if- that does not ignore 
missing values but interprets them as numbers.

say you want summarize age for all observations that have a wage rate 
higher than X and you have missing observations for all that do not report 
a wage rate:

sum age if wage > X

then you include them in your condition

Jo

----------------------
Johannes Geyer
Deutsches Institut f�r Wirtschaftsforschung (DIW Berlin)
German Institute for Economic Research 
Department of Public Economics
DIW Berlin
Mohrenstra�e 58
10117 Berlin
Tel: +49-30-89789-258



Simon Moore <[email protected]> 
Gesendet von: [email protected]
10/01/2008 16:00
Bitte antworten an
[email protected]


An
[email protected]
Kopie

Thema
Re: st: My last word on strange world






I'm a bit confused.  Why is that '.' has a value in gen, egen and 
replace but the maximum value returned by su is not '.'? Surely this is 
inconsistent?
Simon



Austin Nichols wrote:
> Allan--
> This response I utterly fail to understand--I have seconded your call
> for a warning message, several times (is the 3rd time still
> seconding?), while pointing out that no software can prevent people
> from making errors (hence "some casualties are unavoidable" under any
> design).  Software that guesses at what you mean is poorly designed,
> but software that announces the direct implications of what you coded
> is just offering friendly guidance.
>
> I have written a draft version of a command that incorporates warning
> messages for -gen- and -replace- and -egen- but such a command will
> not protect users who have a condition with implications for a later
> -gen- or -replace- or -egen- e.g.
> _pctile y if x>42, nq(100)
> g hi_x_yp5=r(r5)
>
> Writing a more general warning system would be up to Statacorp, since
> it would need to take account of missing values in locals/globals and
> scalars as well, which sounds like a major undertaking.
>
> On Jan 10, 2008 6:09 AM, Allan Reese (Cefas) <[email protected]> 
wrote:
> 
>>> Austin Nichols asks:
>>> ... on the issue of how often a qualifier such as "if x > 42"
>>> can lead to an incorrect analysis, I think there are many dangers of
>>> this sort, and many users fall prey to them.  Users of other software
>>> fall under other wheels, and it seems that some casualties are 
unavoidable.
>>> 
>> Is an attitude I refute utterly and smacks horribly of Harry Lime's 
soliloquy on the Riesenrad (big wheel - Third Man):
>> "If I offered you �20,000 for every dot that stopped - would you 
really, old man, tell me to keep my money? Or would you calculate how many 
dots you could afford to spare?...Free of Income Tax, old man...".
>>
>> Also, the Herald of Free Enterprise disaster started with management 
who declined to add a safety alarm when directly asked.
>>
>> Nick has reminded me I made the same suggestion (warning message) four 
years ago.  As in the case of the Herald, current law allows software 
vendors to deny any responsibility for malfunction or consequential loss. 
Some time, this position will be challenged and changed.
>>
>> Allan
>> 
>
> *
> *   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/
>
> 

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



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