Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: tabstat if, by() stat(sum) Query

From   Bert Jung <>
Subject   Re: st: tabstat if, by() stat(sum) Query
Date   Sat, 24 Nov 2012 13:54:23 -0500


I am not sure if I fully understand your problem but here some thoughts.

(a) If you only want summary statistics "by(ctry2)" then the numbers
in Excel and Stata should match.  The variable "ctry1" seems
irrelevant for this calculation.

(b) If you are comparing summary statistics for different groupings
(one by ctry1 and the other by ctry2) then the composition of each
group is likely to be quite different, and you would get different
numbers for each calculation no matter what software you use.

Maybe also double-check if you have any missing values and how those
are treated by each software.  Maybe Stata omits the missing values in
its calculation but Excel might include them - which would affect your
statistics.  You can check observations count, which should be
identical in both softwares.  In Stata:

tabstat total primary secondary tertiary if year==1990, by(ctry2) stat(count)

Best Bert

On Thu, Nov 22, 2012 at 2:08 AM, Muhammad Anees <> wrote:
> Muhammad
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index