I have this simplest dataset.
var new
0 1
Then I type
tab va
then it should throw me an error saying there is no such variable. But instead it gives me
var | Freq. Percent Cum.
------------+-----------------------------------
0 | 1 100.00 100.00
------------+-----------------------------------
Total | 1 100.00
as if I meant var when I wrote va.
It also does actual work. When I type
replace new =3 if va~=.
then it actually replaces new.
I am shocked. I created this mini example after realizing that my code is doing extremely strange job of not failing to do something that it has to fail.
This is an extremely dangerous thing. If I had believed that my regression output was correct while not realizing this strange behavior of Stata, my research would have been totally wrong, and if someone else finds it out, people will think I did it intentionally and I will be regarded as fraud and my career will be over.
Why does this happen? And how can I 100% make sure Stata doesn't behave this way? And there likely is a name for this behavior. If yes, what is it called? I need to understand this thoroughly.
var new
0 1
Then I type
tab va
then it should throw me an error saying there is no such variable. But instead it gives me
var | Freq. Percent Cum.
------------+-----------------------------------
0 | 1 100.00 100.00
------------+-----------------------------------
Total | 1 100.00
as if I meant var when I wrote va.
It also does actual work. When I type
replace new =3 if va~=.
then it actually replaces new.
I am shocked. I created this mini example after realizing that my code is doing extremely strange job of not failing to do something that it has to fail.
This is an extremely dangerous thing. If I had believed that my regression output was correct while not realizing this strange behavior of Stata, my research would have been totally wrong, and if someone else finds it out, people will think I did it intentionally and I will be regarded as fraud and my career will be over.
Why does this happen? And how can I 100% make sure Stata doesn't behave this way? And there likely is a name for this behavior. If yes, what is it called? I need to understand this thoroughly.
Comment