title: Regression models with same fitted values that output FALSE when compared to each other with equal operator in r
body: <p>Given the cuadratic models for the <code>odor</code> dataset from the <code>faraway</code> package: </p>
  
  <pre><code>&gt; lmod &lt;- lm(odor ~ I(temp) + I(gas) + I(pack)+I(temp^2)+I(gas^2)+I(pack^2)+I(temp*gas)+I(gas*pack)+I(pack*temp),odor)
  &gt; lmod6 &lt;- lm(odor ~ polym(temp,gas,pack,degree = 2),odor)
  </code></pre>
  
  <p>Both models have the same fitted values:</p>
  
  <pre><code>&gt; lmod$fitted
          1         2         3         4         5         6         7         8         9        10        11        12 
   86.62500  45.87500  36.12500  28.37500  42.50000  15.25000  -3.25000 -24.50000  59.87500  29.37500  20.62500 -16.87500 
         13        14        15 
  -30.66667 -30.66667 -30.66667 
  &gt; lmod6$fitted
          1         2         3         4         5         6         7         8         9        10        11        12 
   86.62500  45.87500  36.12500  28.37500  42.50000  15.25000  -3.25000 -24.50000  59.87500  29.37500  20.62500 -16.87500 
         13        14        15 
  -30.66667 -30.66667 -30.66667 
  </code></pre>
  
  <p>However, when comparing these fitted values to each other they are not identical, why is that?</p>
  
  <pre><code>&gt; table(lmod6$fitted==lmod$fitted)
  
  FALSE  TRUE 
     13     2 
  </code></pre>