On 13-04-2010, at 19:02, Lee Adkins wrote:
Hi all,
Although the logic of what Jack says is valid, I think the current implementation is a
bit confusing--basically because it's unexpected. I can't think of another
program that does this, though I'm sure there must be some. The others that I use (R,
Stata, Gauss) don't.
Since the coding of dummy variable is arbitrary (e.g., you could use 1 -1) why should
zero be treated differently from all other scalars and real numbers? I think it could
lead to some unexpected results (for those who don't dive into the manual). For the
sake of consistency I would prefer that all numbers be treated alike.
On the other hand if the zero*NA were treated as the exception and handled with a
special command, that would make more logical sense--at least to me. I find the current
implementation is kind of confusing, especially for gretl's main audience (non
programmers like me) ans students coming from other programs that treat the interaction
likewise (e.g., Stata and R). Just my 2 cents, but I think 'm with Berend on this
one....
I just did this in a Gretl console
gretl console: type 'help' for a list of commands
? scalar x
? x=10/0
Replaced scalar x = NA
Warning: generated missing values
? y=0*x
Generated scalar y = 0
? z1 = tanh(y)
Generated scalar z1 = 0
? z1 = tanh(10/0)
Replaced scalar z1 = NA
? z1 = tanh(10/0.0000000000000000000001)
Replaced scalar z1 = 1
? a=0*(10/0)
Generated scalar a = 0
This doesn't make sense to me.
This is dangerous.
Berend