Skip to content

Commit 7e3c5aa

Browse files
claudegerard314
andcommitted
Ch5: fix stale continent subscripts in indicator functions
PR #578 caught that the first dummy-variable example is described with subscript "Amer" while the text and the display equation below it both refer to Asia. Fix that occurrence and the matching one in the display equation, tidy the "in the Asia" wording, and clean up two other stale subscripts in the fitted-value equation ("Euro" -> "Europe" and a trailing space in "Oceania "). Co-Authored-By: gerard314 <16446591+gerard314@users.noreply.github.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBuUHZXFqZKh7hEJxw5KvT
1 parent cb4c146 commit 7e3c5aa

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

05-regression.qmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,9 +1063,9 @@ We now write the equation for our fitted values $\widehat{y} = \widehat{\text{li
10631063
$$
10641064
\begin{aligned}
10651065
\widehat{y} = \widehat{\text{life exp}} &= b_0 + b_{\text{Asia}}\cdot\mathbb{1}_{\text{Asia}}(x) + b_{\text{Europe}}\cdot\mathbb{1}_{\text{Europe}}(x) \\
1066-
& \qquad + b_{\text{North America}}\cdot\mathbb{1}_{\text{North America}}(x) + b_{\text{Oceania}}\cdot\mathbb{1}_{\text{Oceania }}(x) \\
1066+
& \qquad + b_{\text{North America}}\cdot\mathbb{1}_{\text{North America}}(x) + b_{\text{Oceania}}\cdot\mathbb{1}_{\text{Oceania}}(x) \\
10671067
& \qquad + b_{\text{South America}}\cdot\mathbb{1}_{\text{South America}}(x)\\
1068-
&= `r intercept` + `r offset_asia`\cdot\mathbb{1}_{\text{Asia}}(x) + `r offset_europe`\cdot\mathbb{1}_{\text{Euro}}(x) \\
1068+
&= `r intercept` + `r offset_asia`\cdot\mathbb{1}_{\text{Asia}}(x) + `r offset_europe`\cdot\mathbb{1}_{\text{Europe}}(x) \\
10691069
& \qquad + `r offset_north_america`\cdot\mathbb{1}_{\text{North America}}(x) + `r offset_oceania`\cdot\mathbb{1}_{\text{Oceania}}(x) \\
10701070
& \qquad + `r offset_south_america`\cdot\mathbb{1}_{\text{South America}}(x)
10711071
\end{aligned}
@@ -1081,10 +1081,10 @@ $$
10811081
\right.
10821082
$$
10831083

1084-
In a statistical modeling context, this is also known as a *dummy variable*. \index{dummy variable} In our case, we consider the first such indicator variable $\mathbb{1}_{\text{Amer}}(x)$. This indicator function returns 1 if a country is in the Asia, 0 otherwise:
1084+
In a statistical modeling context, this is also known as a *dummy variable*. \index{dummy variable} In our case, we consider the first such indicator variable $\mathbb{1}_{\text{Asia}}(x)$. This indicator function returns 1 if a country is in Asia, 0 otherwise:
10851085

10861086
$$
1087-
\mathbb{1}_{\text{Amer}}(x) = \left\{
1087+
\mathbb{1}_{\text{Asia}}(x) = \left\{
10881088
\begin{array}{ll}
10891089
1 & \text{if } \text{country } x \text{ is in Asia} \\
10901090
0 & \text{otherwise}\end{array}

0 commit comments

Comments
 (0)