Inference for a linear model

After all that what do estimated parameters mean? Assuming our model assumptions are met we can draw inference based on the estimated parameter values.

Point prediction

Using the slm_sp model we can make a point prediction for the expected bill depth (mm) for Gentoo penguins with a bill length of 50mm.

Recall the model equation is

\[ \begin{aligned} \operatorname{bill\_depth\_mm} &= \alpha + \beta_{1}(\operatorname{bill\_length\_mm})\ + \\ &\quad \beta_{2}(\operatorname{species}_{\operatorname{Chinstrap}}) + \beta_{3}(\operatorname{species}_{\operatorname{Gentoo}})\ + \\ &\quad \epsilon \end{aligned} \]

The fitted equation is given as

\[ \begin{aligned} \operatorname{\widehat{bill\_depth\_mm}} &= 10.59 + 0.2(\operatorname{bill\_length\_mm})\ - \\ &\quad 1.93(\operatorname{species}_{\operatorname{Chinstrap}}) - 5.11(\operatorname{species}_{\operatorname{Gentoo}}) \end{aligned} \]

We can then simply substitute in the values:

\[\widehat{\text{bill depth}} = \hat{\alpha} + \hat{\beta_1}*50 + \hat{\beta_3}*1\] \[\downarrow\]

\[\widehat{\text{bill depth}} = 10.56 + 0.20*50 - 5.10*1\] \[\downarrow\]

\[15.47\text{mm}\]

Rather than by hand we can do this easily in R

What does this look like on a plot?

Confidence intervals for parameters

For the chosen slm_sp model we can get these simply by using confint(). By default the 95% intervals are returned:

So this tells us that For every 1mm increase in bill length we estimate the expected bill depth to increases between 0.165 and 0.234 mm

We estimate that the expected bill depth of a Chinstrap penguin is between 1.5 and 2.4 mm shallower than the Adelie penguin