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: Summarizing variables
From
Lisa Cook <[email protected]>
To
[email protected]
Subject
st: Summarizing variables
Date
Wed, 7 Aug 2013 13:13:15 -0400
Hi,
I'm trying to output values for two variables using Stata/IC 11.2 for Windows.
My dataset includes about 50,000 patients grouped in about 50 primary
care practices. I've created some practice-level variables like
weights and practice-level means, but I'm having trouble getting Stata
to output what I want. My immediate goal is to get Stata to list the
practice IDs and practice weights in a table like this:
practice_code practwt
120 .034
130 .045
etc.
I can get Stata to give me the practice weights if I tell it:
by practice_code, sort: ta practwt
But the output is ugly and impossible to copy into Excel:
-> practice_code = 92
practwt | Freq. Percent Cum.
------------+-----------------------------------
.0068969 | 367 100.00 100.00
------------+-----------------------------------
Total | 367 100.00
I've downloaded the program "vallist", hoping it would do what I
needed, but it doesn't. Any other user-written programs out there? Or
is there an option in a built-in program that I should be using?
Thanks,
Lisa
*
* 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/