Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Same code, same machine, same data, different results

From   Kieran McCaul <>
To   "" <>
Subject   st: RE: Same code, same machine, same data, different results
Date   Thu, 6 Sep 2012 09:34:57 +0800


If you are merging files, then you must be using a -sort- command prior to each merge.
Use the option -stable- with each of these and see if the problem persists.

sort var1 var2, stable

-----Original Message-----
From: [] On Behalf Of Mattia Landoni
Sent: Thursday, 6 September 2012 5:10 AM
Cc: Colleen Honigsberg
Subject: st: Same code, same machine, same data, different results

Dear statalisters,

a friend of mine has a bizarre problem. She is running a regression as follows:

xi: regress a b c i.d i.e

and her output is different every time. Has anyone ever seen a behavior like this? Below are some details.

- Stata 11
- Windows 32-bit

Precise description:
The do-file imports several files from .csv, then merges them, then runs the regression. If I run the do-file, I get certain results. If I issue the same regression command again, I get again the same results, as it should be. However, if I re-run the do-file from the beginning, I get slightly different results and the regression even reports a slightly different number of observations. (Say, 2663 vs. 2666). Every time all the data are taken afresh from the same static .csv sources.
There is nothing random about the do-file, that I know. The xi:
command generates about 200 i-variables and a few, maybe 10, are dropped because of collinearity. There are more than 2500 observations.

I could post the do-file here, but it's big and messy. If anyone has any insight after reading the above description, I'd be very glad to hear it.



Mattia Landoni
+1 217 4-A-QUANT (from US)
+39 02 3206 21676 (from Italy)
GMT -05:00 (US East)
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index