Line for the server
Cheers, I knew I had overlooked something. Huge relief, though, that Stata
does indeed deliver what I want :-)
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Sergiy Radyakin
Gesendet: Montag, 26. Januar 2009 17:54
An: [email protected]
Betreff: Re: st: total
Martin,
tabstat is more flexible and does both casewise and non-casewise statistics:
. tabstat mpg rep78, stat(sum)
stats | mpg rep78
---------+--------------------
sum | 1576 235
------------------------------
. tabstat mpg rep78, stat(sum) casewise
stats | mpg rep78
---------+--------------------
sum | 1469 235
------------------------------
Best regards, Sergiy Radyakin
On Mon, Jan 26, 2009 at 10:07 AM, Stas Kolenikov <[email protected]> wrote:
> 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/
>
*
* 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/
*
* 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/