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.