I'm Stata-proficient but learning SPSS for my new position. I am using a simple dataset to do very basic regressions and comparing to see if the results are the same. They're not. I'm close, but the magnitudes of the betas and significance are slightly different. The data was copy and pasted into each from an Excel; I didn't use a Stata file in SPSS, or vice versa. For SPSS, I did not weight it, it's using listwise deletion, and it's on the "enter" method. I presume Stata is doing the same, as its default (but correct me if I'm wrong and it's a different default!).
Any ideas on what else to check? I'm doing just a simple linear regression.
Data: https://www.dropbox.com/s/8g31cjf8vr69i44/rwj%20county%20data.xls?dl=0
Syntax
SPSS
REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF
/DEPENDENT FreeLunch
/METHOD=ENTER FoodInsecure Rural Female @18 Hispanic.
(Or, for point and click, analyze->regression->linear; forces a choice under "method" for enter/stepwise/remove/backward/forward.)
Stata
reg percentfreelunch percentfoodinsecure rural female under18 hispanic
Data is in Excel and was pasted into both.
Results
SPSS
Var. | Unst.B | Std.Err. | St.B | t | Sig.
(Constant) | -139.616 | 66.652 | -2.095 | .045
% Food Insecure | 2.785 | .674 | .546 | 4.131 | .000
Rural | .131 | .048 | .404 | 2.701 | .011
Female | 2.657 | 1.170 | .372 | 2.270 | .031
< 18 | -.416 | .583 | -.145 | -.715 | .480
Hispanic | 1.156 | .236 | 1.092 | 4.905 | .000
Stata
Var. | Coef. | Std.Err. | t | P>|t|
percentfoodinsecure | 2.76532 | .6741544 | 4.10 | 0.000
rural | .1378976 | .0495354 | 2.78 | 0.009
female | 2.826711 | 1.204272 | 2.35 | 0.026
under18 | -.3799895 | .588423 | -0.65 | 0.523
hispanic | 1.168375 | .2398765 | 4.87 | 0.000
_cons | -149.3858 | 69.0891 | -2.16 | 0.039
And thank you, @Nick Cox!
– ShannonC Aug 26 '14 at 17:19I'm Stata-proficient but learning SPSS for my new position.My condolences – StasK Aug 26 '14 at 19:00Tried to save my Stata data for use in SPSS, and even using saveold, it's not creating an old enough version for SPSS, so I need to work that out. Does anyone know how to force-save it to an even older version?
Been looking at all the SPSS settings; seem to be clean, but it's not my area of expertise. I could've missed something.
Hispanic and under18 are correlated; this is just a sample reg from an old dataset to practice SPSS.
Thanks for all the input! Going to keep trying.
*edit: looks like @whuber has an answer!
– ShannonC Aug 26 '14 at 20:02import excelrather than copy and paste. – Nick Cox Aug 26 '14 at 21:37R. At least in older versions of Windows, only plain text format was placed in the Clipboard. Excel chose to copy the text as it was formatted rather than trying to find some universal representation for the data as stored (which is next to impossible anyway). In newer versions of Windows several data structures can be placed in the Clipboard, eliminating this problem, but I don't know the details for recent versions of Excel. – whuber Aug 27 '14 at 14:14