Exercise 8.1 introduces a data set on birth weight of babies. Another variable we consider is parity, which is 0 if the child is the first born, and 1 otherwise. The summary table below shows the results of a linear regression model for predicting the average birth weight of babies, measured in ounces, from parity.
Estimate Std. Error t value Pr(>|t|) (Intercept) 120.07 0.60 199.94 0.0000 parity -1.93 1.19 -1.62 0.1052
average birth weight = 120.07 -1.93*parity
When parity is 0 (first born), the average birth weight is 120.07 ounces. When parity is 1 (not first born), the average bith weight is 120.07 - 1.93 = 118.14 ounces.
120.07 - 1.93
## [1] 118.14
No. It isn’t statistically significant at the 5% level.
Researchers interested in the relationship between absenteeism from school and certain demographic characteristics of children collected data from 146 randomly sampled students in rural New South Wales, Australia, in a particular school year. Below are three observations from this data set.
The summary table below shows the results of a linear regression model for predicting the average number of days absent based on ethnic background (eth: 0 - aboriginal, 1 - not aboriginal), sex (sex: 0 - female, 1 - male), and learner status (lrn: 0 - average learner, 1 - slow learner).
Estimate Std. Error t value Pr(>|t|) (Intercept) 18.93 2.57 7.37 0.0000 eth -9.11 2.60 -3.51 0.0000 sex 3.10 2.64 1.18 0.2411 lrn 2.15 2.65 0.81 0.4177
average number of days absent = 18.93 - eth(9.11) + 3.10(sex) + 2.15(lrn)
When student is not aboriginal, average absent days is 9.11 less than 18.93 (statistically significant).
When student is male, average absent days is 3.10 more than 18.93.
When student is a slow learner, average absent days is 2.15 more than 18.93.
Based on calculations below, the residual is -22.18 days.
eth <- 0
sex <- 1
lrn <- 1
predicted <- 18.93 - eth*9.11 + 3.10*sex + 2.15*lrn
2 - predicted
## [1] -22.18
R2 is 0.08933641. R2 adjusted is 0.07009704.
var_residual <- 240.57
var_outcome <- 264.17
n <- 146
k <- 3
R2 <- 1 - (var_residual/var_outcome)
R2_adjusted <- 1 - (var_residual/var_outcome) * ((n-1)/(n-k-1))
R2
## [1] 0.08933641
R2_adjusted
## [1] 0.07009704