Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: tabstat if, by() stat(sum) Query
From
Bert Jung <[email protected]>
To
[email protected]
Subject
Re: st: tabstat if, by() stat(sum) Query
Date
Sat, 24 Nov 2012 13:54:23 -0500
Muhammad,
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 <[email protected]> wrote:
> Muhammad
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/