I use Stata 17 (24 cores).
I am sorry that I cannot provide the reproducible example because this problem is really a problem of Stata generating different result at different times. But I can provide this screenshot.
Array
lnFirmEmp is created by "gen lnFirmEmp = log(FirmEmp)"
There are more than 10M observations. In just two of them, I got weird results.
1st observation in the screenshot: It should be 10.854624 if I take the log. It gave me 10.854639. After the data was generated and saved, I checked the accuracy and it was wrong. So I created log variable once again ("lnFirmEmp2"). Then now it's correct.
2nd observation in the screenshot: After taking log, ".b" was created. I have more than 10M observations and many of them are missing "FirmEmp", but this was the only case where Stata thought it should be ".b" after taking the log. It's very strange.
3rd observation in the screenshot: It's correct.
But these problems disappeared after I re-ran the code (That is, Log created 10.854624 in the 1st observation, and created "." in 2nd observation.)
How can I explain this situation?
I ran the same code. Stata made two "mistakes" in the first try among lots of calculations. Stata didn't make these mistakes in the second try.
Can Stata really just make mistakes when somehow it didn't interact very well with my CPU?
Related Posts with Is it possible that log mis-calculates it or create weird ".b" when the workload is too heavy?
Generating data to balance a panel datasetHi, I have a panel from Compustat like the below in Table 1 (table 1 is a subset of the data to sho…
hybrid model pseudo-panel.hello! this might sound like a silly question, but I was wondering if one might be able to fit a hy…
Running Diebold Mariano test using panel data.Hi everyone, I am totally new here and very new to Stata, nice to meet you all. This maybe a very s…
Latent class and standard errosDear Stata users, I am running a latent class analysis with gsem command. I had some problems on con…
Getting different results from running same exact code - why?I am dropping observations based on various if statements written in a do file. I have all the code …
Subscribe to:
Post Comments (Atom)
0 Response to Is it possible that log mis-calculates it or create weird ".b" when the workload is too heavy?
Post a Comment