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?
Related Posts with I am shocked that Stata may not understand variable names literally
Check whether -moremata- is installedWhen writing .do-files which make use of user written commands, first I check whether these programs…
egen and mean help neededDear all, I am dealing with a micro data where I have around 100000 observations from 81 cities abou…
IV first stage regressionHi, I was asked to do the first stage (only) in IV regression and then get a table about it. Here ar…
Where do I find elemapi.dta ?I'm learning to do regression analysis with Stata following the link here : https://stats.idre.ucla.…
Reshape error: variable id does not uniquely identify the observationsDear All, I am trying to use the reshape command on the data attached, but I keep receiving this er…
Subscribe to:
Post Comments (Atom)
0 Response to I am shocked that Stata may not understand variable names literally
Post a Comment