Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: RE: tab varname without the varname label

From   Nick Cox <>
To   "''" <>
Subject   st: RE: tab varname without the varname label
Date   Wed, 9 Feb 2011 11:46:22 +0000

I don't think there is such an option, but this is programmable. Just clone the variable in a temporary variable, strip it of its variable label and fire up the command. Strictly you need a new variable label that is the name, but the effect is as you wish. 

Rough demonstration sketch, largely untested: 

program jmptab 
	version 8.2 
	syntax varname [if] [in] [fweight aweight iweight] [, *] 
	tempvar clone 
	clonevar `clone' = `varlist' 
	label var `clone' "`varlist'" 
	tab `clone' `if' `in' [`weight' `exp'] , `options' 


José Maria Pacheco de Souza

Is there some option in tab that presents the real name of a variable
instead of the label attached to it? Something alike -tab varname, nolab-
used to present a tabulation not using the values label.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index