On Wed, 4 May 2011, Qi Shi wrote:
There are three variables y,x.and z in my data, in which z is a
dummy. I would like to define a new variable w: if z=1, w=y;
otherwise w=-infinity. What is the scripts? thanks!
In principle,
w = (z==1)? y : -1/0
However, you can't actually represent infinities in gretl: the
expression "-1/0" will produce a missing value (NA).
Allin Cottrell