I have been looking for a clear answer to my question, with unsuccessful results so far... I am using R to compute a linear model between two variables. In a perfect world, I should obtain a relationship such as y = x, with a slope equal to 1 and an intercept of 0.
Below is a summary of the linear model I am computing with R:
Call:
lm(formula = Y ~ X, data = Data)
Residuals:
Min 1Q Median 3Q Max
-24.6647 -2.5081 0.7563 2.8372 24.9408
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -5.80592 1.48049 -3.922 0.000171 ***
X 1.09599 0.02548 43.015 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 8.121 on 90 degrees of freedom
Multiple R-squared: 0.9536, Adjusted R-squared: 0.9531
F-statistic: 1850 on 1 and 90 DF, p-value: < 2.2e-16
I understand that my intercept is -5.8 and slope 1.09. What I don't understand, based on the p-value that is also provided, if it says that it is statistically different from 0 and 1, or the complete opposite?
Thanks a lot for your help !! :)
lm(y~x,offset=x,...)
or equivalentlylm((y-x)~x,,...)
then look a the F-value for the regression. If you just want to test for slope being different from 1, just look at the test for its coefficient. $\endgroup$lm(Y-X ~ X, Data)
and inspect the p-value at the bottom right of the summary output: it is a simultaneous test of your hypotheses. $\endgroup$