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" <[email protected]>
To   [email protected]
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
names)?

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,
Melissa
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index