Different best fit, and obtain p-value from regression in R
<p>I have this graph, from package <code>car</code>, figure 1:
<a href="https://i.stack.imgur.com/samr0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/samr0.png" alt="enter image description here" /></a></p>
<p>The code is:</p>
<pre><code>scatterplot(istat_22 ~ vpa_cnr_2,grid=F, smooth=F)
</code></pre>
<p>But if i want the p-value of the regression line, and r and r^2,how i can obtained it and plot them on the graph?
Substancially i would the equation of the straight line and the value of the statistic.
Another question is, why if I plot with <code>lm</code>, like:</p>
<pre><code>plot(vpa_cnr_2,istat_22)
abline(lm(vpa_cnr_2 ~ istat_22),col=&quot;red&quot;)
</code></pre>
<p>the straight line is not the same of figure 1 (see the figure 2)?</p>
<p>figure 2
<a href="https://i.stack.imgur.com/gpz9t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gpz9t.png" alt="enter image description here" /></a></p>
<p>Yes i know, it depend from intercept, but R don't find the best fit with function <code>lm</code>?</p>