title: Differences between stepAIC in R and stepwise in SPSS
body: <p>I am trying to learn R after learning SPSS and using SPSS for my statistics on a couple papers. I have been using my data to help me learn and understand R as well. In my data, i had to find some Linear Regressions in SPSS using a stepwise comparison to eliminate variables that do not "fit" the model. I tried using stepAIC with the MASS package, because i thought it was the equivalent, and got some completely different output, as well as stuff i did not understand and had to look up. My question is, what are the differences between stepwise in SPSS and stepAIC? (is stepwise more conservative than stepAIC?) Is there a way to write stepAIC code that would be equivalent to stepwise? Or is there a different package that could help me out?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>mydata &lt;- read.csv("Eric.csv")
  AveSBP &lt;- mydata[, 3]
  MaxVi &lt;- mydata[, 7]
  PeakForce &lt;- mydata[, 8]
  MaxPO &lt;- mydata[, 9]
  Height &lt;- mydata[, 10]
  BMI &lt;- mydata[, 11]
  NeckCirc &lt;- mydata[, 12]
  ArmLength &lt;- mydata[, 13]
  ArmSpan &lt;- mydata[, 14]
  WaistCircum &lt;- mydata[, 15]
  LegLength &lt;- mydata[, 16]
  FatAth &lt;- mydata[, 17]
  Diff &lt;- mydata[, 18]
  Ratio &lt;- mydata[, 19]
  lm1 &lt;- lm(AveSBP ~ MaxVi + PeakForce + MaxPO + Height + BMI + NeckCirc + ArmLength + ArmSpan + WaistCircum + LegLength + FatAth + Diff + Ratio)
  summary(lm1)
  stepAIC(lm1, directions="both")
  </code></pre>
  
  <p>I am running them on Windows 7 Pro x64, R x64 3.1.0, and SPSS x64 v21.</p>