Are my slope and intercept significantly different from 1 and 0? 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 !! :)

Unless there is a way to specify otherwise like there is in a function like t.test, the p-values in this kind of printout in R is for a test of the coefficient being zero, so you have quite strong evidence that neither the slope nor the intercept is zero. (Nothing you did specifies otherwise, though there might be a way to code the summary function to do so. If there is, I don’t know it.)
You have use the standard error and estimated value to construct a confidence interval. While there are ways to be more thorough about such a calculation, a “quick and dirty” way to get about a $95\%$ confidence interval for each coefficient is to take the estimated value $\pm$ two standard errors.
$$
\text{Intercept}: -5.81\pm 1.48 = (-8.77, -2.85)\\
\text{Slope}: 1.10\pm 0.0255 = (1.05, 1.15)
$$
These confidence intervals give somewhat strong evidence that the intercept is not zero and the slope is not one (though this one is close and might not be practically different from one; that is, the true (population-level) slope might not be one but might not be so different that you care).
