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

st: version control and ambiguous abbreviations


From   Ramani Gunatilaka <[email protected]>
To   [email protected]
Subject   st: version control and ambiguous abbreviations
Date   Wed, 16 Nov 2005 20:10:46 +0000

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

local fname1 "c:\CHINA\uricevar02"
local fname2 "c:\CHINA\ricevar02"
global sectors = "1 2"
local sec $sectors
local i=1
	foreach x of local sec{
	use `fname`x'', clear
	keep happy $basefactors
	
................

The whole thing grinds to a halt at this point and -set trace on-
revealed that Stata doesn't like three Chinese provinces starting with
Sh. This is the output:

*****************************8
 30.         }
- foreach x of local sec{
- use `fname`x'', clear
= use c:\CHINA\uricevar02, clear
- keep happy $basefactors
= keep happy 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 Sh
Sh ambiguous abbreviation
*****************
Can someone please help? I'd be very grateful.
Cheers,
Ramani

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