The default behavior of almost any Stata command is to restrict the
sample to the listwise deleted missing entries. Since -rep78- has some
missing data, the sample was restricted to the observations with
complete data on both variables. That is making good sense, as
otherwise things like estimation of -e(V)- with missing data would be
a nightmare. I can only think of the distinction between -corr- and
-pwcorr- as an example of an official Stata command where there is a
difference in that treatment of missing data.
On Mon, Jan 26, 2009 at 8:19 AM, Martin Weiss <[email protected]> wrote:
> Dear Statalisters,
>
> just a quick question: When I
>
> sysuse auto, clear
> total mpg
>
> the result is 1,576. An additional element in the -varlist- for -total-
> changes the whole bargain:
>
> total mpg rep78
>
> results in 1,469 as the total for mpg. Why would I want this behavior?
> Obviously, I can replicate the 1,469 with
>
> qui egen float tot = total(mpg) if !missing(rep)
> l tot in l
>
> But if all I wanted was a matrix of totals for my vars, why would a missing
> value in one of them invalidate the total for the others? Is there an easy
> explanation that I am overlooking?
>
>
> Best
> Martin
>
>
>
>
> *
> * 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/
>
--
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.
*
* 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/