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
Invalid name errorSo I am trying to upload a .csv file into Stata, but when I run it, it gives me an 'Invalid name' er…
new ASA "statement" re: p-valuesas has been discussed in this Forum in the past, the ASA previously issued a statement attempting to…
Using quantile regression to model the distribution of the dependent variableDear all, I have a dataset with a dependent variable y and three independent variables x1 x2 x3. Si…
Interaction term with individual in FEHello! I have a following question: I want to estimate the impact of increased use of computers by …
JACKKNIFE for GSEMHello stata experts, I'm running a latent class analysis (gsem command) using NIH HINTS dataset (ht…
Subscribe to:
Post Comments (Atom)
0 Response to I am shocked that Stata may not understand variable names literally
Post a Comment