diff --git a/exercises/jsp.md b/exercises/jsp.md index 40ecc61..e5820e3 100644 --- a/exercises/jsp.md +++ b/exercises/jsp.md @@ -1,7 +1,13 @@ -Exercise: Junior School Project -================ -Nora Wickelmaier -2025-06-20 +--- +title: "Exercise: Junior School Project" +author: "Nora Wickelmaier" +output: + md_document: + variant: gfm + preserve_yaml: true +kramdown: + math_engine: mathjax +--- Load the Junior School Project collected from primary (U.S. term is elementary) schools in inner London in R. You might need to install the @@ -71,11 +77,11 @@ aggregate(gcraven ~ school, dat, mean) |> head() ## 5 5 5.075722e-16 ## 6 6 0.000000e+00 -3. Create a plot with `lattice::xyplot()` with `gcraven` on the - $x$-axis and `math` on the $y$-axis and one panel for each school. - Use `type = c("p", "g", "r")`. You can also use `ggplot2` if you - want to. What would be your conclusion about the need for - school-specific slopes based on this plot? +3. Create a plot with `lattice::xyplot()` with `gcraven` on the x-axis + and `math` on the y-axis and one panel for each school. Use + `type = c("p", "g", "r")`. You can also use `ggplot2` if you want + to. What would be your conclusion about the need for school-specific + slopes based on this plot? @@ -108,9 +114,11 @@ aggregate(gcraven ~ school, dat, mean) |> head() &~~~ + \beta_{4}\,mraven_i + \beta_{5}\,(gcraven_{ij} \times mraven_{i})\\ &~~~ + \upsilon_{0i} + \upsilon_{1i}\,gcraven_{ij} + \varepsilon_{ij} \end{align*} - $$ with - $\boldsymbol\upsilon \sim N(\boldsymbol 0, \boldsymbol{\Sigma}_\upsilon)$ - i.i.d., $\varepsilon_{ij} \sim N(0, \sigma^2)$ i.i.d. + $$ + + with + $$\boldsymbol\upsilon \sim N(\boldsymbol 0, \boldsymbol{\Sigma}_\upsilon)$$ + i.i.d., $$\varepsilon_{ij} \sim N(0, \sigma^2)$$ i.i.d. 5. Interpret the parameters of the model: diff --git a/exercises/jsp_files/figure-gfm/unnamed-chunk-2-1.png b/exercises/jsp_files/figure-gfm/unnamed-chunk-2-1.png index 758816b..b648f8c 100644 Binary files a/exercises/jsp_files/figure-gfm/unnamed-chunk-2-1.png and b/exercises/jsp_files/figure-gfm/unnamed-chunk-2-1.png differ