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

st: Re: collapse problem


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: Re: collapse problem
Date   Wed, 11 Sep 2002 13:41:41 +0100

Alejandro Riano wrote:

> I'm collapsing the standard deviation for a set of variables
(monthly
> frequency):
>
> collapse (sd) er rer, by(country_name year)
>
> but if for example one country doesn't have data for all the year,
i'm
> getting a 0 instead of a missing value after doing the collapse, do
you know
> how can i solve this ?

but John Hennen could not reproduce this:

> Are you certain that there isn't at least one observation in the
missing-data
> country for the year at issue?   Here is a counter-example using the
auto.dta
> dataset, showing that, when the variable of interest (mpg) is
missing in a cell,
> collapse returns sd = ., not zero.

[ snip ]

The resolution of this lies in the fact that Stata 7 was updated
on 2 August 2002 to fix this bug. See -help whatsnew- in any
Stata updated since then.

I guess that Alejandro has not updated, but John has.

Nick
[email protected]

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