Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Same data, same code, same stata version, different computers, different results

    Dear all,

    I am running a production function estimation based on maximum likelihood.
    The code is as follows:

    xtset id year
    set seed 1
    prodest logT, free(logl) state(logk) method(lp) acf id(id) t(year) reps(1000) poly(2) fsresiduals(fse) translog


    Running the code does not cause any problems. However, we ran the command on three different computers obtaining two different results of the production function coefficients from the third decimal onwards. Hence, the differences are small but notable.
    - the dataset is the same
    - the stata version is the same
    - there is no sort command before estimation
    - the computers are all thinkpads, same models
    - the command is the exact same (including the set seed and number of iterations)

    Does anybody have an idea why the results on two computers are the same but slightly different on the third computer?

    Best,

    Max

  • #2
    Hi Max,

    Could it be that the third computer uses a crack/illegal version of stata? In those cases stata alters the results of calculations. Only legitimate stata licences provide correct caculations.

    Kind regards,

    Joeri

    Comment


    • #3
      Dear Joeri,

      We have installed the official stata version with according licenses on all computers.

      Best,

      Max

      Comment


      • #4
        Consider comparing the output of the set command on all three systems. For example, if the odd system has done set type double, permanent that might explain the variations. Admittedly it seems a low probability of being the cause, but you never know. There are likely other settings that similarly could similarly affect the calculations.

        Comment


        • #5
          Make a do.-file that creates a log file of the analysis. In the do-file include lines at the top for querying and displaying: the dataset signature, Stata born date and build number, current update date and the entire list of creturn settings (put that line after the -set seed-). Run the do-file on each of the machine and use a text editor to find differences in the log files.

          Comment


          • #6
            I forgot to mention: that assumes that -prodest- is an official Stata command. If it is user-written, then it isn't foolproof, but add -which prodest- to the do-file.

            Comment


            • #7
              Dear Joseph and William,

              Thanks for the advice! I will try it today!

              Comment

              Working...
              X