# For lm() coefficient in R, why not give slope directly? Focus “slope”,not a parameter estimation method [duplicate]

Like this example, it shows (Intercept) and x, why not slope? And I'm not sure x means what?

x <- c(1,4,12,34,86,99)

y <- c(12, 48, 500, 1000, 1200,3242)

plot(x, y)

lm(y~x)
Coefficients:
(Intercept)            x
27.65        24.73

summary(lm(formula = y ~ x))

Call:
lm(formula = y ~ x)

Residuals:
1       2       3       4       5       6
-40.38  -78.57  175.60  131.56 -954.36  766.16

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)   27.652    360.332   0.077   0.9425
x             24.729      6.487   3.812   0.0189 *
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 623.2 on 4 degrees of freedom
Multiple R-squared:  0.7842,    Adjusted R-squared:  0.7302
F-statistic: 14.53 on 1 and 4 DF,  p-value: 0.0189

• Your model equation is $E(y) = \alpha + x \beta$. The output shows estimated values for all parameters, i.e. $\alpha$ and $\beta$. Since $\beta$ is the parameter of a linear term ($x$), it can be interpreted as a slope. This would not be the case if the model equation was e.g. specified as $E(y) = \alpha + x^2 \beta$. – Michael M Sep 25 '17 at 7:42
• Totally clear now, both multiple variables and the higher order items should't use slope to describe the regression. It's safer to say that: they are parameters for the model equation. Thanks. – Grace_G Sep 25 '17 at 7:56
• Thank you, but sorry, duplicate means? – Grace_G Sep 25 '17 at 8:57
• Duplicate means that there is another question on CrossValidated where your question is answered. – Peter Flom - Reinstate Monica Sep 25 '17 at 11:29
• Thanks, checked and not duplicate. That focus on parameter estimation method, not discuss more variables, this will help more people in this view. – Grace_G Sep 25 '17 at 11:50

The issue is, that lm() or summary do have different labelling conventions for each explanatory variable. Instead of writing slope_1,slope_2,.... They simply use the name of the varibale in any output to incate which coefficients belong to which variable.

Extending your example for another variable

x1 <- c(1,4,12,34,86,99)
x2 <- c(10,11,0,4,8,9)

y <- c(12, 48, 500, 1000, 1200,3242)

lm(y~x1+x2)
summary(lm(y~x1+x2))

...
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)  138.968    647.456   0.215   0.8438
x1            24.946      7.492   3.330   0.0447 *
x2           -17.122     76.737  -0.223   0.8378
...


Outputs the two slopes of the regression - x1 and x2 - and the intercept.

• Wow, I see, so consider the variable number, here it like the weight of the corresponding variable, now slope...will not so good to decribe...But, if just one variable, x means slope of the regression line? – Grace_G Sep 25 '17 at 7:23
• In your specific case - yes, But generally, the slope is labeled by the name of the variable you put into the lm(). So if you use lm(y~ANY_SHITTY_NAME), the slope in summary can be found under ANY_SHITTY_NAME. – Jogi Sep 25 '17 at 8:14
• ...Yes, also an useful view, the x can be take replaced by any...name:P in output. Thanks. – Grace_G Sep 25 '17 at 10:58

If anyone is interested,
Here is a title--- a simple example of first degree spline with single knot and interpretation of the estimated coefficients to calculate the slope of the fitted lines in https://stackoverflow.com/questions/37362738/how-to-interpret-lm-coefficient-estimates-when-using-bs-function-for-splines
I think this regression use two E(y)=α+xβ, so, needn't calculate these two slopes (when degree = 1), according to what I have learnt, just extract from summary is okay, but I'm not sure... fit <- lm(formula = y ~ bs(x, degree = 1, knots = c(0)))

Coefficients:
Estimate Std. Error t value Pr(>|t|)

(Intercept) 5.01351 0.02072 242.0 <2e-16 ***
bs(x, degree = 1, knots = c(0))1 -5.04119 0.03034 -166.2 <2e-16 ***
bs(x, degree = 1, knots = c(0))2 4.96375 0.02714 182.9 <2e-16 *** @ Michael M, @Jogi