El Wednesday 22 October 2008 07:52:02 Irwin, James R escribió:
Hi folks. What is the GRETL translation of the command "REPLACE
... IF"
in STATA?
Specifically, in STATA I would use REPLACE W=. IF L==0 to
change my data in STATA (making the variable W missing if the variable L
is zero).
Messing around in GRETL I have come up with the following 3 lines:
smpl L=0 --restrict
genr W=NA
smpl --full
Is there a simpler/briefer way to do this is GRETL? Maybe using IF?
Thanks for any suggestions -- jim irwin (economic historian, moving from
STATA to GRETL).
May be the following command works as you want:
series W=W*misszero(L)/L
--
Ignacio Diaz-Emparanza
DEPARTAMENTO DE ECONOMÍA APLICADA III (ECONOMETRÍA Y ESTADÍSTICA)
UPV/EHU
Avda. Lehendakari Aguirre, 83 | 48015 BILBAO
T.: +34 946013732 | F.: +34 946013754
www.et.bs.ehu.es