Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Truncation of long variable names with xi

From   "Melissa A. Clark" <>
Subject   st: Truncation of long variable names with xi
Date   Wed, 30 Aug 2006 18:01:10 -0400

I would like to loop through several categorical variables, run
regressions of an outcome on these variables using the "xi" command,
and then manipulate the regression results for each dummy variable
created by xi.  However, with long variable names, xi truncates the
names of the newly created dummy variables, so I am unable to refer to
variable "_Ilongvariablename" after running the regression.  Does
anyone know of a solution (other than giving my variables shorter

Here is an example of my code:

foreach var of varlist a b c longvariablename d e f g {;
xi: svy: outcome i.`var' ;
               postfile `results' beta se using `signif';
	foreach binary of varlist _I`var'_* {;
		post `results' (_b[`binary']) (_se[`binary']) ;
	postclose `results';

Many thanks,
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index