Skip to content

Commit

Permalink
re-build HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
friendly committed Oct 24, 2024
1 parent dcc653a commit 097e2d5
Show file tree
Hide file tree
Showing 14 changed files with 116 additions and 91 deletions.
5 changes: 2 additions & 3 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ format:

# see: https://github.com/bgreenwell/quarto-crc for quarto and CRC press
# https://github.com/yihui/bookdown-crc bookdown, CRC Press
pdf-engine-opt:
interaction: nonstopmode
pdf:
documentclass: krantz
classoption: [10pt, krantz2]
Expand All @@ -184,7 +182,8 @@ format:
geometry:
- top=20mm
- left=25mm
code-block-bg: 'E8FFFF' #'#f1f1f1'
code-block-bg: "dce8e7" # or #e6f2ee, not 'E8FFFF' #'#f1f1f1'
interaction: nonstopmode



Expand Down
10 changes: 9 additions & 1 deletion bib/pkgs.bib
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ @Manual{R-GGally
url = {https://ggobi.github.io/ggally/},
}

@Manual{R-gganimate,
title = {gganimate: A Grammar of Animated Graphics},
author = {Thomas Lin Pedersen and David Robinson},
year = {2024},
note = {R package version 1.0.9},
url = {https://gganimate.com},
}

@Manual{R-ggbiplot,
title = {ggbiplot: A Grammar of Graphics Implementation of Biplots},
author = {Vincent Q. Vu and Michael Friendly},
Expand Down Expand Up @@ -301,7 +309,7 @@ @Manual{R-langevitour
}

@Manual{R-lattice,
title = {lattice: Trellis Graphics for {R}},
title = {lattice: Trellis Graphics for R},
author = {Deepayan Sarkar},
year = {2024},
note = {R package version 0.22-6},
Expand Down
1 change: 1 addition & 0 deletions bib/pkgs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ car
carData
dplyr
forcats
gganimate
ggplot2
knitr
matlib
Expand Down
4 changes: 2 additions & 2 deletions docs/03-multivariate_plots.html
Original file line number Diff line number Diff line change
Expand Up @@ -1863,7 +1863,7 @@ <h1 class="title"><span id="sec-multivariate_plots" class="quarto-section-identi
<span><span class="fu"><a href="https://rdrr.io/r/graphics/lines.html">lines</a></span><span class="op">(</span><span class="va">axes.x</span>, <span class="va">axes.y</span>, col <span class="op">=</span> <span class="st">"grey"</span><span class="op">)</span></span>
<span><span class="fu"><a href="http://friendly.github.io/matlib/reference/vectors.html">vectors</a></span><span class="op">(</span><span class="va">P2</span>, labels <span class="op">=</span> <span class="va">labs</span>, cex.lab <span class="op">=</span> <span class="fl">1.8</span>, lwd <span class="op">=</span> <span class="fl">3</span><span class="op">)</span></span>
<span><span class="fu"><a href="https://rdrr.io/r/graphics/par.html">par</a></span><span class="op">(</span><span class="va">op</span><span class="op">)</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details><div class="cell quarto-layout-panel" data-layout-align="center" data-layout-ncol="2">
</details><div class="cell quarto-layout-panel" data-layout-ncol="2" data-layout-align="center">

</div>
<div class="cell" data-layout-align="center">
Expand Down Expand Up @@ -2344,7 +2344,7 @@ <h1 class="title"><span id="sec-multivariate_plots" class="quarto-section-identi
Pineo, P. O., &amp; Porter, J. (2008). Occupational prestige in canada. <em>Canadian Review of Sociology</em>, <em>4</em>(1), 24–40. <a href="https://doi.org/10.1111/j.1755-618x.1967.tb00472.x">https://doi.org/10.1111/j.1755-618x.1967.tb00472.x</a>
</div>
<div id="ref-R-lattice" class="csl-entry" role="listitem">
Sarkar, D. (2024). <em>Lattice: Trellis graphics for r</em>. <a href="https://lattice.r-forge.r-project.org/">https://lattice.r-forge.r-project.org/</a>
Sarkar, D. (2024). <em>Lattice: Trellis graphics for <span>R</span></em>. <a href="https://lattice.r-forge.r-project.org/">https://lattice.r-forge.r-project.org/</a>
</div>
<div id="ref-R-GGally" class="csl-entry" role="listitem">
Schloerke, B., Cook, D., Larmarange, J., Briatte, F., Marbach, M., Thoen, E., Elberg, A., &amp; Crowley, J. (2024). <em>GGally: Extension to ggplot2</em>. <a href="https://ggobi.github.io/ggally/">https://ggobi.github.io/ggally/</a>
Expand Down
32 changes: 16 additions & 16 deletions docs/04-pca-biplot.html

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions docs/06-linear_models-plots.html
Original file line number Diff line number Diff line change
Expand Up @@ -1704,8 +1704,6 @@ <h1 class="title"><span id="sec-linear-models-plots" class="quarto-section-ident
::: {.cell layout-align="center"}
```{.r .cell-code}
Expand All @@ -1727,8 +1725,6 @@ <h1 class="title"><span id="sec-linear-models-plots" class="quarto-section-ident
-->
<p>Because of the interaction with <code>type</code>, the fitted effects for <code>income</code> are calculated for the three types of occupation. It is easiest to compare these in the a single plot (using <code>multiline = TRUE</code>), rather than in separate panels as in <a href="#fig-prestige-allEffects" class="quarto-xref">Figure&nbsp;<span>6.17</span></a>. Income is represented as <code>log10(income)</code> in the model <code>prestige.mod3</code>, and it is also easier to understand the interaction by plotting income on a log scale, using the <code>axes</code> argument to specify a transformation of the <span class="math inline">\(x\)</span> axis. I use 68% confidence bands here to make the differences among type more apparent.</p>
<div class="cell" data-layout-align="center">
Expand Down
14 changes: 7 additions & 7 deletions docs/07-lin-mod-topics.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ <h1 class="title">

<ul>
<li>
<a href="#sec:betaspace" id="toc-sec:betaspace" class="nav-link active" data-scroll-target="#sec\:betaspace"><span class="header-section-number">7.1</span> Ellipsoids in data space and <span class="math inline">\(\mathbf{\beta}\)</span> space</a>
<a href="#sec-betaspace" id="toc-sec-betaspace" class="nav-link active" data-scroll-target="#sec-betaspace"><span class="header-section-number">7.1</span> Ellipsoids in data space and <span class="math inline">\(\mathbf{\beta}\)</span> space</a>
<ul class="collapse">
<li><a href="#coffee-stress-and-heart-disease" id="toc-coffee-stress-and-heart-disease" class="nav-link" data-scroll-target="#coffee-stress-and-heart-disease"><span class="header-section-number">7.1.1</span> Coffee, stress and heart disease</a></li>
</ul>
Expand All @@ -379,9 +379,10 @@ <h1 class="title">
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://patchwork.data-imaginist.com">patchwork</a></span><span class="op">)</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://r-forge.r-project.org/projects/car/">car</a></span><span class="op">)</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/friendly/matlib">matlib</a></span><span class="op">)</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://forcats.tidyverse.org/">forcats</a></span><span class="op">)</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://forcats.tidyverse.org/">forcats</a></span><span class="op">)</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://gganimate.com">gganimate</a></span><span class="op">)</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<section id="sec:betaspace" class="level2" data-number="7.1"><h2 data-number="7.1" class="anchored" data-anchor-id="sec:betaspace">
<section id="sec-betaspace" class="level2" data-number="7.1"><h2 data-number="7.1" class="anchored" data-anchor-id="sec-betaspace">
<span class="header-section-number">7.1</span> Ellipsoids in data space and <span class="math inline">\(\mathbf{\beta}\)</span> space</h2>
<p>It is most common to look at data and fitted models in “data space,” where axes correspond to variables, points represent observations, and fitted models are plotted as lines (or planes) in this space. As we’ve suggested, data ellipsoids provide informative summaries of relationships in data space. For linear models, particularly regression models with quantitative predictors, there is another space—“<span class="math inline">\(\mathbf{\beta}\)</span> space”—that provides deeper views of models and the relationships among them. This discussion extends <span class="citation" data-cites="Friendly-etal:ellipses:2013">Friendly et al. (<a href="95-references.html#ref-Friendly-etal:ellipses:2013" role="doc-biblioref">2013</a>)</span>, Sec. 4.6.</p>
<p>In <span class="math inline">\(\mathbf{\beta}\)</span> space, the axes pertain to coefficients, for example <span class="math inline">\((\beta_0, \beta_1)\)</span> in a simple linear regression. Points in this space are models (true, hypothesized, fitted) whose coordinates represent values of these parameters. For example, one point <span class="math inline">\(\widehat{\mathbf{\beta}}_{\text{OLS}} = (\hat{\beta}_0, \hat{\beta}_1)\)</span> represents the least squares estimate; other points, <span class="math inline">\(\widehat{\mathbf{\beta}}_{\text{WLS}}\)</span> and <span class="math inline">\(\widehat{\mathbf{\beta}}_{\text{ML}}\)</span> would give weighted least squares and maximum likelihood estimates, and the line <span class="math inline">\(\beta_1 = 0\)</span> represents the null hypothesis that the slope is zero.</p>
Expand Down Expand Up @@ -665,7 +666,7 @@ <h1 class="title">
<span> color <span class="op">=</span> <span class="st">"Error on Y?"</span>,</span>
<span> shape <span class="op">=</span> <span class="st">"Error on Y?"</span>,</span>
<span> linetype <span class="op">=</span> <span class="st">"Error on Y?"</span><span class="op">)</span> <span class="op">+</span></span>
<span> <span class="fu">legend_inside</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="fl">0.2</span>, <span class="fl">0.9</span><span class="op">)</span><span class="op">)</span></span>
<span> <span class="fu">legend_inside</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="fl">0.25</span>, <span class="fl">0.8</span><span class="op">)</span><span class="op">)</span></span>
<span></span>
<span><span class="va">p2</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span><span class="op">(</span>data<span class="op">=</span><span class="va">model_stats</span>, </span>
<span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">errX</span>, y <span class="op">=</span> <span class="va">sigma</span>, </span>
Expand All @@ -677,8 +678,7 @@ <h1 class="title">
<span> y <span class="op">=</span> <span class="st">"Model residual standard error"</span>,</span>
<span> color <span class="op">=</span> <span class="st">"Error on Y?"</span>,</span>
<span> shape <span class="op">=</span> <span class="st">"Error on Y?"</span>,</span>
<span> linetype <span class="op">=</span> <span class="st">"Error on Y?"</span><span class="op">)</span> <span class="op">+</span></span>
<span> <span class="fu">legend_inside</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op">(</span><span class="fl">0.8</span>, <span class="fl">0.9</span><span class="op">)</span><span class="op">)</span></span>
<span> linetype <span class="op">=</span> <span class="st">"Error on Y?"</span><span class="op">)</span> </span>
<span></span>
<span><span class="va">p1</span> <span class="op">+</span> <span class="va">p2</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output-display">
Expand Down Expand Up @@ -725,7 +725,7 @@ <h1 class="title">
</div>
<div class="cell" data-layout-align="center">
<p><strong>Packages used here</strong>:</p>
<p>9 packages used here: car, carData, dplyr, forcats, ggplot2, knitr, matlib, patchwork, tidyr</p>
<p>10 packages used here: car, carData, dplyr, forcats, gganimate, ggplot2, knitr, matlib, patchwork, tidyr</p>
</div>


Expand Down
Loading

0 comments on commit 097e2d5

Please sign in to comment.