On Fri, 10 Apr 2009, Raz Lev wrote:
hi
I am trying to run the following:
genr monthly_w_c = if (V4 < 6) V49/1000 else V49 endif
and am getting an error "The symbol 'if' is undefined"
is there a way to generate the series in one command or do I need to create a list of
1/1000s and 1s and multiply?
thanks
Do this:
genr monthly_w_c = (V4 < 6) ? V49/1000 : V49
You may also want to look at the "Cheat sheet" manual chapter, for more
tricks like this.
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti