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]
st: summary statistics for hierarchical data in one single table
From
Michael Tekle Palm <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: summary statistics for hierarchical data in one single table
Date
Fri, 26 Apr 2013 16:46:14 +0200
I'm attempting to create a summary statistics table for three variables, with the population disaggregated into two levels, that is presented in one single table instead of a series of tables. I am using Stata 11.2 for Mac OS.
The general idea of what kind of table I want to create can be illustrated using the following Stata command:
by village sex: summarize age enrolled grade
where "village" is my highest hierarchical class, "sex" is my lower hierarchical class, and "age", "enrolled" and "grade" are the three variables I want summary statistics for. However, this command creates {village*sex} number of tables. Simply put, I want the same type of output created by this variable but compiled in a single table and then exportable to LaTeX. I have attempted to create a visual example of how one might envision the table to look below:
Variable | Obs Mean Std. Dev. Min Max
----------------------------------------------------------------------------------------
VILLAGE#1 |
male |
age | 221 13.9 4.23 4 21
enrolled | 221 .84 .36 0 1
grade | 221 4.23 3.21 0 12
female |
age | 220 14.5 4.1 4 22
enrolled | 220 .87 .33 0 1
grade | 220 4.84 3.52 0 12
VILLAGE#2 |
male |
age | 180 ETC... ETC...
Any help will be greatly appreciated by a thesis-writing novice Stata user!
Regards,
Michael
*
* 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/