Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re: ds command


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Re: ds command
Date   Fri, 13 Dec 2002 10:39:51 -0000

Zhehui Luo
 
> Some Stata commands (eg., regress, ds) produce shortened 
> variable names if 
> the variable name is longer than 8 characters. But some 
> commands (eg., sum) 
> do not so that. Is there a way of forcing Stata not to 
> abbreviate variable 
> names in the former, especially ds command?

You can always program your own. For example, 
this never abbreviates and writes names in 
40-column fields: 

program def zlds 
	version 7 
	syntax [varlist] 
	local nvars : word count `varlist' 
	tokenize `varlist' 
	foreach i of num 1(2)`nvars' { 
		local j = `i' + 1 
		di "{txt}``i''{col 40}``j''"
	}
end 		

Another partial answer to this is to check out -ds3- from 
SSC, offered as one upward-compatible extension 
of -ds2-. -ds3- has a -cols()- option which allows 
some control over the degree of abbreviation. 

Nick 
n.j.cox@durham.ac.uk 
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index