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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: capture results from tabulate


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: capture results from tabulate
Date   Thu, 22 Dec 2011 22:16:48 +0000

Use -contract- instead. Under -by:- only the last table is saved

Nick

On 22 Dec 2011, at 22:08, Daniel Marcelino <dmsilv@gmail.com> wrote:

Dear all,

I looking for capture somehow the higher value showed in "Freq."
column, as well the label of v3 for each city table. Any idea?

bysort city : tabulate v3 [iw=weight]


/*replication*/
clear
input str2 city weight byte(v1 v2 v3)
 "a" .5 1 2 3
 "a" .1 2 3 4
 "a" .9 3 2 5
  "a" .8 3 4 2
 "a" .2 4 5 1
 "a" .3 5 1 3
 "b" .4 1 4 3
 "b" .1 2 3 4
 "b" .6 3 2 5
"b" .8 4 1 2
"b" .5 4 5 1
"b" .7 1 5 4
"c" .4 2 1 3
"c" .2 2 4 1
"c" .7 3 4 5
"c" .3 4 1 2
"c" .8 4 5 1
"c" .1 5 4 3
end
*
*   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/


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