Type the transcript that fits the least-squares line for score on income and prints the two coefficients.
Type the transcript that fits the least-squares line for score on income and prints the two coefficients.
Answer
> fit <- lm(score ~ income) > coef(fit) (Intercept) income 544.176665 2.065922
lm(response ~ explanatory). coef() prints β̂₀ and β̂₁ at full precision — 544.18 and 2.066 as computed by hand in L4.3.
BCc ch 8 (software output), CC BY 4.0 — shape only; S21 W3 handout (two full outputs, rounding remark — shape only); every transcript line is the verbatim console text of a real Rscript run (2026-09-17)