Try this:
replace materials=costmaster if materials==.|materials<0
Ward
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Oliinik,
Victoria
Sent: Tuesday, February 05, 2008 12:48 PM
To: [email protected]
Subject: st: replacing some values in column A by the values from column
B
Dear statalisters,
Does anyone know whether (and how) I can get Stata to do the following:
I have a variable "materials" which contains a lot of missing and
negative values. Where values are missing, or negative, I want Stata to
take corresponding values from a variable "costmater" and replace them
in the column "materials".
Thanks
Victoria
======================================================
LICOS Centre for Institutions and Economic Performance
Katholieke Universiteit Leuven
Deberiotstraat 34 - bus 3511, B-3000 Leuven, Belgium
Office: 03.21
ph ++32 (0)16 32 65 66
fax ++32 (0)16 32 65 99
Website: http://www.econ.kuleuven.be/licos/
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
*
* 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/
*
* 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/