Hello all,
I ran into an unexpected behavior when generating a binary indicator from a numeric variable that sometimes contains missing values.
When I run:
I notice that if x is missing (.), then y becomes 1.
I had assumed that missing would propagate to missing or evaluate to false.
So my question is why Stata evaluates the expression . > 0 as true (i.e., 1)?
Sincerely,
Nick
I ran into an unexpected behavior when generating a binary indicator from a numeric variable that sometimes contains missing values.
When I run:
Code:
generate y = x > 0
I had assumed that missing would propagate to missing or evaluate to false.
So my question is why Stata evaluates the expression . > 0 as true (i.e., 1)?
Sincerely,
Nick

Comment