From what I can tell, the -tabstat- command limits the display of variable names to at most 16 characters, even when using the -varwidth- option. Is there a way to force -tabstat- to display the full name of the variable? Looking at the code in tabstat.ado, the upper bound of 16 characters is hard coded and (appears) arbitrary. If I change this segment of code:
to this
the command now supports variable names of up to 32 characters in length. Is there a better way to force -tabstat- to display full variable names, besides redefining the command (e.g. tabstat2.ado)? Is there a reason why this command limits the display of variable names to 16 characters, when Stata supports variables with names up to 32 characters? I haven't looked through the code to tabstat extensively, so maybe the reason is buried there, but upon first inspection, this limit looked completely arbitrary.
If this is an arbitrary choice, I'd love it if the next update to Stata 13 tweaked this to increase the upper bound to 32 characters, in line with Stata's variable name policy. It seems like it would be a trivial change.
Code:
if `varwidth' == -1 { local varwidth 12 } else if !inrange(`varwidth',8,16) { local varwidth = clip(`varwidth',8,16) dis as txt /// "(option varwidth() outside valid range 8..16; `varwidth' assumed)" }
Code:
if `varwidth' == -1 { local varwidth 12 } else if !inrange(`varwidth',8,32) { local varwidth = clip(`varwidth',8,32) dis as txt /// "(option varwidth() outside valid range 8..32; `varwidth' assumed)" }
If this is an arbitrary choice, I'd love it if the next update to Stata 13 tweaked this to increase the upper bound to 32 characters, in line with Stata's variable name policy. It seems like it would be a trivial change.
Comment