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 !! :)

The package emmeans has a great function to test various hypotheses about linear models.  Here I show how to test the slope different than 1 (the standard summary output already tests the intercept different from zero.
> data(trees)
> 
> mod <- lm(Height ~ Girth, data=trees)
> summary(mod)

Call:
lm(formula = Height ~ Girth, data = trees)

Residuals:
     Min       1Q   Median       3Q      Max 
-12.5816  -2.7686   0.3163   2.4728   9.9456 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  62.0313     4.3833  14.152 1.49e-14 ***
Girth         1.0544     0.3222   3.272  0.00276 ** 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 5.538 on 29 degrees of freedom
Multiple R-squared:  0.2697,    Adjusted R-squared:  0.2445 
F-statistic: 10.71 on 1 and 29 DF,  p-value: 0.002758

> 
> library(emmeans)
> mod.emt <- emtrends(mod, ~1, var="Girth")
> mod.emt
 1       Girth.trend    SE df lower.CL upper.CL
 overall        1.05 0.322 29    0.395     1.71

Confidence level used: 0.95 
> test(mod.emt, null=1)
 1       Girth.trend    SE df null t.ratio p.value
 overall        1.05 0.322 29    1   0.169  0.8672

