Linear Regression - Result Table
regression_table <- data.frame(
Estimate = c(52941.015, 37958.600, 30603.225, -6495.486, 20508.566, 66389.758, 110172.629),
Std.Error = c(5387.956, 4867.390, 5304.728, 1876.676, 3747.704, 3460.828, 6141.901),
Pr.Value = rep("<0.001", 7)
)
rownames(regression_table) <- c("(Intercept)", "S to M company", "M to L company", "Non-remote to Somewhat Remote", "EN to MI", "MI to SE", "SE to EX")
regression_table|>
kbl()|>
kable_styling(bootstrap_options = "striped", full_width = F, position = "left")
|
|
Estimate
|
Std.Error
|
Pr.Value
|
|
(Intercept)
|
52941.015
|
5387.956
|
<0.001
|
|
S to M company
|
37958.600
|
4867.390
|
<0.001
|
|
M to L company
|
30603.225
|
5304.728
|
<0.001
|
|
Non-remote to Somewhat Remote
|
-6495.486
|
1876.676
|
<0.001
|
|
EN to MI
|
20508.566
|
3747.704
|
<0.001
|
|
MI to SE
|
66389.758
|
3460.828
|
<0.001
|
|
SE to EX
|
110172.629
|
6141.901
|
<0.001
|
Let’s examine the table of results from the linear model. Since all
dependent variables are factors, each change in level is in a different
row. This is because a change in the factor’s level will likely result
in a different salary change. For example, as observed in our Tukey test
for experience level, moving from entry to middle level results in a
different salary change compared to moving from senior to expert
level.
All p-values are less than 0.001, indicating high statistical
significance in predicting salaries.
Now, regarding company size, a move from a small to medium company is
estimated to increase salary by ~$38,000, with standard errors around
$5,000. The same move from medium to large results in an ~$30,000 salary
increase. The effect of a change in company size in this linear
regression is not the same as in the Tukey test because other variables
are considered: the regression is multivariate, while the Tukey test has
one independent variable.
Next, a move from a non-remote to a somewhat-remote job is estimated
to decrease salary by ~$6,500, with a standard error nearly $2,000,
which is relatively large compared to the variable’s effect.
For experience levels, moving from entry to middle level increases
salary by approximately $20,500, with a standard error of ~$3,700. For
middle level to senior, the increase is ~$66,000 (standard error
~$3,500), and from senior to expert, it’s ~$110,000 (standard error
~$6,100). Again, the effect of a change in experience in this linear
regression differs from that in the Tukey test due to there being more
variables xin the model.
Linear Regression - R Squared Result Table
r_vals <- c(0.2173,0.216)
adjusted <- c("Unadjusted", "Adjusted")
r_sq <- data.frame(
Adjusted= adjusted,
Value = r_vals
)
r_sq|>
kbl()|>
kable_styling(bootstrap_options = "striped", full_width = F, position = "left")
|
Adjusted
|
Value
|
|
Unadjusted
|
0.2173
|
|
Adjusted
|
0.2160
|
Finally, an adjusted R-squared value of 0.216 indicates that the
model explain 21.6% of the variability in salary. This relatively low
value indicates there’s a significant portion of variability
unaccounted for due to the lack of all necessary variables.