Database Reference
In-Depth Information
results <- lm(Income˜Age + Education + Gender, income_input)
summary(results)
Call:
lm(formula = Income ˜ Age + Education + Gender, data =
income_input)
Residuals:
Min 1Q Median 3Q Max
-37.340 -8.101 0.139 7.885 37.271
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.26299 1.95575 3.714 0.000212 ***
Age 0.99520 0.02057 48.373 < 2e-16 ***
Education 1.75788 0.11581 15.179 < 2e-16 ***
Gender -0.93433 0.62388 -1.498 0.134443
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' '
1
Residual standard error: 12.07 on 1496 degrees of freedom
Multiple R-squared: 0.6364, Adjusted R-squared: 0.6357
F-statistic: 873 on 3 and 1496 DF, p-value: < 2.2e-16
The intercept term, , is implicitly included in the model. The lm() function
performs the parameter estimation for the parameters (j = 0, 1, 2, 3) using
ordinary least squares and provides several useful calculations and results that are
stored in the variable called results in this example.
After the stated call to lm() , a few statistics on the residuals are displayed in the
output. The residuals are the observed values of the error term for each of the n
observations and are defined for i = 1, 2, …n, as shown in Equation 6.6 .
6.6
where b j denotes the estimate for parameter β j for j = 0, 1, 2, … p - 1
From the R output, the residuals vary from approximately -37 to +37, with a
median close to 0. Recall that the residuals are assumed to be normally distributed
with a mean near zero and a constant variance. The normality assumption is
examined more carefully later.
Search WWH ::




Custom Search