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

From |
Kit Baum <baum@bc.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Collapse with sum function and missing values |

Date |
Wed, 10 Feb 2010 10:06:30 -0500 |

<> This is somewhat semantic. The presence of 3 and 4 in the group id suggests that such groups exist; they merely have no members in the present sample. It should be easy enough to -mvdecode- x==0 to x==. This reminds me of a grouse I had about the calculation of the s.d. of data that were all missing. The mean of these data was computed properly as missing, but the s.d. was reported as 0. Pedantically, as all values took on the same NAN value, there was indeed zero variance. I convinced StataCorp that this was not a good idea, and that the s.d. or variance of data that are all missing is indeed missing. That is now what -tabstat- does. Kit On Feb 10, 2010, at 2:33 AM, Michael wrote: > Shouldn't the value of -x- for groups 3 and 4 be missing, not zero. > To me, the sum of a series of missing values is a missing value. I am > doing a collapse for about 100 variables (100 x values) and need the > value to be defined as missing (not 0) in such cases. Any ideas? Kit Baum | Boston College Economics & DIW Berlin | http://ideas.repec.org/e/pba1.html An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html * * 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/

**Follow-Ups**:**Re: st: Collapse with sum function and missing values***From:*"Elizabeth Allred" <lizard@hsph.harvard.edu>

- Prev by Date:
**Re: st: RE: Tracing dofile execution** - Next by Date:
**st: RE: AW: dealing with duplicate "pairs" of columns** - Previous by thread:
**re: st: Collapse with sum function and missing values** - Next by thread:
**Re: st: Collapse with sum function and missing values** - Index(es):

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