Skip to content

Commit db0b1da

Browse files
committed
Render full book, add automated checks, and update dependency setup
1 parent d2e32ef commit db0b1da

117 files changed

Lines changed: 3809 additions & 377 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/book-checks.yml‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Book Checks
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
pull_request:
7+
branches: [master, main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
render-and-test:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 90
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up R
20+
uses: r-lib/actions/setup-r@v2
21+
with:
22+
use-public-rspm: true
23+
24+
- name: Set up Quarto
25+
uses: quarto-dev/quarto-actions/setup@v2
26+
27+
- name: Install R package dependencies
28+
run: Rscript scripts/install_book_requirements.R
29+
30+
- name: Render book (HTML)
31+
run: quarto render --to html
32+
33+
- name: Run book integrity tests
34+
run: Rscript scripts/check_book_tests.R

‎01-pvalue.qmd‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ In the simulation, we generate n = 71 normally distributed IQ scores with means
168168
#| fig-cap: "Distribution of *p*-values when power = 50%."
169169
170170
#Set number of simulations
171+
set.seed(1605)
171172
nSims <- 100000 # number of simulated experiments
172173
p <- numeric(nSims) # set up empty variable to store all simulated *p*-values
173174
bars <- 20
@@ -225,6 +226,7 @@ When there is no true effect, and test assumptions are met, *p*-values for a *t*
225226
#| fig-cap: "Distribution of *p*-values when the null hypothesis is true."
226227
227228
#Set number of simulations
229+
set.seed(1620)
228230
nSims <- 100000 #number of simulated experiments
229231
p <-numeric(nSims) #set up empty variable to store all simulated *p*-values
230232
@@ -812,7 +814,7 @@ In our simulations, we know whether there is a true effect or not, but in the re
812814
```{r, echo = FALSE, results = 'asis'}
813815
opts_p <- c(
814816
"The effect is significant, and provides strong support for the alternative hypothesis.",
815-
answer = "The effect is significant, but it is without any doubt a Type 1 error.",
817+
"The effect is significant, but it is without any doubt a Type 1 error.",
816818
"With high power, you should use an alpha level that is smaller than 0.05, and therefore, this effect cannot be considered significant. ",
817819
answer = "The effect is significant, but the data are more likely under the null hypothesis than under the alternative hypothesis."
818820
)
Binary file not shown.
Binary file not shown.
-200 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
-198 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)