Statalist The Stata Listserver


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

RE: Re: st: From spell to person-month file


From   "A. Manzoni" <a.manzoni@uvt.nl>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: Re: st: From spell to person-month file
Date   Wed, 29 Mar 2006 13:07:04 +0200

Hi.
If I write this command,

**
foreach x in b c d e f g h i j k l m n o p q r s t u {
foreach y of varlist bp45 cp36 dp34 ep34 fp27g gp30g zp331 hp32g ip32g jp32g
kp44 lp42 mp40 np3401 op3401 pp3701 qp3501 rp3901 sp3901 tp6501 up3601 {
use "D:\Project\Data_anal\GSOEP\My analyses\persm_job.dta", clear
sort persnr month
merge persnr month using "D:\Project\Data_anal\GSOEP\My
analyses\temp\\`x'p_int.dta", keep (y)
ren y contr_`x'
drop _merge
save "D:\Project\Data_anal\flex\contract_gsoep.dta", replace
}
}
**
 it doesn't work because it can't find the y variable in the using data
file. My y infact is in the using data faile.
How can I write this command?

Thanks,
Anna


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