From ed76cdaf0b5294f010c64dca0bc2a267a5117774 Mon Sep 17 00:00:00 2001 From: ***** <721466+soodoku@users.noreply.github.com> Date: Thu, 12 Nov 2026 21:28:06 -0800 Subject: [PATCH 1/2] Enforce American spelling with codespell Co-Authored-By: Claude Fable 5.2 --- .Rbuildignore | 1 + .codespellrc | 3 +++ NEWS.md | 4 ++-- R/stnd_cor.R | 2 +- man/stnd_cor.Rd | 2 +- tests/testthat/test-power.R | 2 +- vignettes/using_guess.Rmd | 2 +- 7 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 .codespellrc diff --git a/.Rbuildignore b/.Rbuildignore index d82bd6d..95cf85c 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -25,3 +25,4 @@ ^\.Ruserdata$ ^Makefile$ ^CITATION\.cff$ +^\.codespellrc$ diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..4f10d30 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,3 @@ +[codespell] +builtin = clear,rare,en-GB_to_en-US +skip = *.pdf,*.png,*.jpg,*.jpeg,*.gif,*.csv,*.tsv,*.json,*.geojson,*.graphml,*.ipynb,*.html,*.svg,*.bib,*.bbl,*.lock,*.parquet,*.rda,*.rds,*.RData,*.dta,*.xlsx,*.xml,*.min.js,*.map,*.log,*.aux,./inst/WORDLIST diff --git a/NEWS.md b/NEWS.md index 0ff476d..77737c6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -105,7 +105,7 @@ is 0.3.0, so 0.4.0, 0.5.x and 0.6.0 are all superseded here. `dk` (don't know -> know) take their place. The order is now `gg, gk, gd, kk, dg, dk, dd, gamma`. Code that indexes DK parameters by name or position must be updated. Learning is `gk + dk` -- those who learned the item from guessing, plus those who - learned it from confessed ignorance. It was `gk + kd`, which the vignette rationalised + learned it from confessed ignorance. It was `gk + kd`, which the vignette rationalized as "true learning plus those who learned but lost confidence". * **`simulate_lca_dk()` gains `dg` and `dk` arguments and loses `kg` and `kd`.** The @@ -211,7 +211,7 @@ restriction `x1d/x0d = x10/x00`. the correct ones. `fit_nodk()` and `fit_dk()` remain exported and unchanged in behavior. -* **The optimiser no longer prints its iteration trace.** `solnp()` is called with +* **The optimizer no longer prints its iteration trace.** `solnp()` is called with `control = list(trace = 0)`, so `lca_fit()` and `lca_se()` are silent. A 100-resample bootstrap previously emitted hundreds of lines, which is how a genuine warning gets lost. diff --git a/R/stnd_cor.R b/R/stnd_cor.R index 01465e8..e47a137 100644 --- a/R/stnd_cor.R +++ b/R/stnd_cor.R @@ -3,7 +3,7 @@ #' Estimate of learning adjusted with standard correction for guessing. #' Correction is based on number of options per question. #' The function takes separate pre-test and post-test dataframes. Why do we -#' need dataframes? To accomodate multiple items. The items can carry NA +#' need dataframes? To accommodate multiple items. The items can carry NA #' (missing). Items must be in the same order in each dataframe. Assumes that #' respondents are posed same questions twice. #' The function also takes a \code{guessing_probability} vector --- the chance of getting a diff --git a/man/stnd_cor.Rd b/man/stnd_cor.Rd index 664065d..77cbd5e 100644 --- a/man/stnd_cor.Rd +++ b/man/stnd_cor.Rd @@ -37,7 +37,7 @@ a list of three vectors, carrying pre-treatment corrected scores, Estimate of learning adjusted with standard correction for guessing. Correction is based on number of options per question. The function takes separate pre-test and post-test dataframes. Why do we -need dataframes? To accomodate multiple items. The items can carry NA +need dataframes? To accommodate multiple items. The items can carry NA (missing). Items must be in the same order in each dataframe. Assumes that respondents are posed same questions twice. The function also takes a \code{guessing_probability} vector --- the chance of getting a diff --git a/tests/testthat/test-power.R b/tests/testthat/test-power.R index 10eace2..bbd9586 100644 --- a/tests/testthat/test-power.R +++ b/tests/testthat/test-power.R @@ -9,7 +9,7 @@ # # The design perturbs the class mix handed to the GOF statistic away from the # parameters that generated the data, by a known amount, so "more wrong" is a -# number rather than a judgement. +# number rather than a judgment. # # Measured over 100 replicates at n=500, alpha=0.05: # diff --git a/vignettes/using_guess.Rmd b/vignettes/using_guess.Rmd index 1b48752..543704f 100644 --- a/vignettes/using_guess.Rmd +++ b/vignettes/using_guess.Rmd @@ -33,7 +33,7 @@ If you assume that the data are missing completely at random, you can simply ign We now know a little bit about Don't Know. One generally strategy is to treat Don't Know responses as ignorance. But research suggests that on average there is approximately 3\% hidden knowledge behind Don't Know responses. See [DK Means DK](https://johnbullock.org/papers/DKs/DK.pdf) by Robert Luskin and John Bullock. Thus one can also choose to replace Don't Know responses with .03. 3. **Related Knowledge** -People either know a particular piece of information or they don't. On an open-ended question, they may struggle to remember it but those kinds of concerns don't apply to closed-ended questions where the task is simply to identify the correct answer. What does on occassion happen on closed-ended questions is that people have related cognitions. So for instance, asked to identify the prime minister of France, the respondents sometimes know that one of the options is the king of Sudan and may guess randomly between the remaining options. But that isn't the same as knowing the prime minister of France. +People either know a particular piece of information or they don't. On an open-ended question, they may struggle to remember it but those kinds of concerns don't apply to closed-ended questions where the task is simply to identify the correct answer. What does on occasion happen on closed-ended questions is that people have related cognitions. So for instance, asked to identify the prime minister of France, the respondents sometimes know that one of the options is the king of Sudan and may guess randomly between the remaining options. But that isn't the same as knowing the prime minister of France. #### Standard Correction for Guessing From f42d98821dbedbcbb85b4e8f354f827f057c5ce4 Mon Sep 17 00:00:00 2001 From: ***** <721466+soodoku@users.noreply.github.com> Date: Fri, 13 Nov 2026 14:17:55 -0800 Subject: [PATCH 2/2] Pin the repo's own R jobs to ubuntu-24.04 On the image ubuntu-latest now resolves to, sudo ignores -E, so r-lib/actions/setup-r-dependencies loses R_LIB_FOR_PAK and cannot install pak. r-canon v2.2.0 pins its jobs the same way. Co-Authored-By: Claude Fable 5.2 --- .github/workflows/statistical-tests.yml | 2 +- .github/workflows/update-citation-cff.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/statistical-tests.yml b/.github/workflows/statistical-tests.yml index 9279adb..ff8599b 100644 --- a/.github/workflows/statistical-tests.yml +++ b/.github/workflows/statistical-tests.yml @@ -30,7 +30,7 @@ on: jobs: monte-carlo: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-citation-cff.yml b/.github/workflows/update-citation-cff.yml index 6f1eb42..bd0f047 100644 --- a/.github/workflows/update-citation-cff.yml +++ b/.github/workflows/update-citation-cff.yml @@ -17,7 +17,7 @@ permissions: jobs: update-citation-cff: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: