Bookmark and Share

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: RE: Re: extend characters in tabm


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: Re: extend characters in tabm
Date   Wed, 13 Oct 2010 17:28:10 +0100

That is one of mine. 

No. The help for -tabm- says it all. The extra options for -tabm- are precisely those of -tabulate- for two variables; in turn its options do not include anything like this. But by default you should get the variable label. 

But what you want is programmable. You could, for example, clone -tabm- so that it is -table- that is applied to the results, not -tabulate-. 

Here is a recipe for -tabm2-:

1. Copy tabm.ado to tabm2.ado. You now need to edit tabm2.ado in a text editor. 

2. New header lines are 

*! 1.0.0 NJC 13 October 2010
program define tabm2, byable(recall) 

3. The line
   
        tab `OKlist' `w', `options'

becomes 

	table `OKlist' `w', `options' 

4. The lines 
        
     if "`trans'" == "" { 
		tab _stack `data' `w', `options' 
	}
      else tab `data' _stack `w' , `options'

become 

     if "`trans'" == "" { 
		table _stack `data' `w', `options' 
	}
      else table `data' _stack `w' , `options'

Nick 
[email protected] 

Kelly

Is there a way to extend the character width of the variable name with
the tabm command (from -tab_chi- on SSC)?  Similar to stubwidth option
in the table command.

I want to display the variable label as opposed to the variable name.


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index