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

st: ambiguous abbvreviations


From   Christopher F Baum <[email protected]>
To   [email protected]
Subject   st: ambiguous abbvreviations
Date   Wed, 16 Nov 2005 17:21:23 -0500

Hi Statalist,
I am trying to write a simple programme to regress some variables,
store their coefficients and means. I have cobbled together bits from
other codes which were written under different versions, which may be
a problem. I have Version 8.2 but the programme reverts to version 3
at this line:
global m: word count $basefactors /*number of independent variables*/
This is my code:

/*setting up global variables*/
global basefactors = "ln_pcy02 chgln_pcy ln_pcy02_sqd age agesq edyrs
male single divorced widowed ethmin cpmem unempld r_health workhrs
finassets hhdebt Anhui Chongqing Gansu Guangdong Guangxi Guizhou Hebei
Henan Hubei Hunan Jiangsu Jiangxi Jilin Liaoning Shaanxi Shandong
Shanxi Sicuan Xinjiang Yunnan Zhejiang" /*independent variables in
standard equation*/
global m: word count $basefactors /*number of independent variables*/



Not the problem at all. Take the equal sign out of the definition of basefactors. Evaluating the RHS causes teh string to be truncated. This used to happen at 80 bytes; recent improvements lengthen the max string var (256 bytes?) but you've hit the limit.

Kit
*
* 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