diff --git a/DESCRIPTION b/DESCRIPTION index 6a6cb1b..6a360c0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: galamm Title: Generalized Additive Latent and Mixed Models -Version: 0.1.1.9000 +Version: 0.2.0 Authors@R: c( person(given = "Øystein", family = "Sørensen", diff --git a/cran-comments.md b/cran-comments.md index f0a1e7b..0bc2a64 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,81 +1,20 @@ ## Submission note -This is a resubmission aimed at fixing current issues. There are three types of -issues, and the respective fixes are described under each header below: - -### 1. Memory issues (clang-ASAN, gcc-ASAN, valgrind) - -I was able to reproduce the error both using debug mode locally with 'R -d lldb' -and using the Docker image rocker/r-devel-san. -The issue was caused by attempting to access a vector element at a an index -'-2', which clearly does not work. This case has now been fixed, and the fix is -described in more detail here: https://github.com/LCBC-UiO/galamm/issues/165. - -### 2. Errors on r-oldrelease - -I here explain why the failure happened, and how it has been fixed. - -Letting 'fam' be some model family, e.g., 'fam <- binomial()' or -'fam <- gaussian()', I had a test 'is.na(fam$dispersion)'. In R4.2.3 these -'fam' objects would not have an element named 'dispersion', and would cause a -fail. In R4.3.1 'fam' does have a 'dispersion' element, and -hence the test passed here. I have rewritten the code so it does not rely on -this element, and verified it using devtools::test_win_oldrelease(). The fix -is described in more detail here: https://github.com/LCBC-UiO/galamm/issues/167. - -### 3. Errors on M1 Mac - -On M1 Mac, 10 tests are skipped and 1 test fails. The failing test happens -because the expected deviance value differs from the computed deviance value -at 3rd decimal (885.7339 vs 885.7341). I have thus reduced the tolerance of this -test, and also confirmed that the version now being submitted works with the -R Mac Builder (test outputs provided below). - +This is an update to the package which contains bug fixes, improvements of +the code base, and more documentation and examples. ## Test environments * R development version with sanitizer support via rocker/r-devel-san. +* R 4.3.1 build with valgrind on a local Ubuntu 22.04. * R Mac Builder (https://mac.r-project.org/macbuilder/submit.html) * Windows, r-release, r-oldrelease, r-devel. -* Local Apple M1 Max in debug mode (R -d lldb) on R4.3.1. -* Local Apple M1 Max, on R4.3.1 and R4.2.3. +* Local Apple M1 Max, on R4.3.3. * R-CMD-check via GitHub Actions on windows-latest, macOS-latest, ubuntu-20.04 (release), and ubuntu-20.04 (devel). ## R CMD check results -### r-devel-san - -0 ERRORs, 0 WARNINGs, 0 NOTEs - -### R Mac Builder - -0 ERRORs, 0 WARNINGs, 1 NOTE: - -* checking installed package size ... NOTE - installed size is 24.1Mb - sub-directories of 1Mb or more: - doc 1.9Mb - libs 21.1Mb - -### Windows, r-release, r-oldrelease, r-devel - -0 ERRORs, 0 WARNINGs, 1 NOTE: - -* checking CRAN incoming feasibility ... [15s] NOTE -Maintainer: 'Øystein Sørensen ' - -Days since last update: 4 - -### Local Apple M1 Max in debug model (R -d lldb) - -0 ERRORs, 0 WARNINGs, 0 NOTEs - -### Local Apple M1 Max, on R4.3.1 and R4.2.3. - -0 ERRORs, 0 WARNINGs, 0 NOTEs - -### GitHub Actions +There were 0 ERRORs, 0 WARNINGs, 0 NOTEs -0 ERRORs, 0 WARNINGs, 0 NOTEs diff --git a/data-raw/lifespan.R b/data-raw/lifespan.R index 6f22ec8..e39a868 100644 --- a/data-raw/lifespan.R +++ b/data-raw/lifespan.R @@ -1,17 +1,28 @@ # Simulate lifespan data from Section 4.1 in Sørensen et al. (2023) library(tidyverse) library(mvtnorm) +library(mgcv) set.seed(3) trajectories <- readRDS("data-raw/trajectories.rds") + +# Fix trajectory for executive function: +mod <- gam(execfun_trajectory ~ s(age), + data = filter(trajectories, age < 25 | age > 50)) + +# Fix trajectory for episodic memory: +mod2 <- gam(epmem_trajectory ~ s(age), + data = filter(trajectories, age < 40 | age > 70)) +plot(mod2) + epmem_fun <- approxfun( trajectories$age, - trajectories$epmem_trajectory + predict(mod2, newdata = trajectories) ) wmem_fun <- approxfun( trajectories$age, trajectories$wmem_trajectory ) execfun_fun <- approxfun( - trajectories$age, trajectories$execfun_trajectory + trajectories$age, predict(mod, newdata = trajectories) ) n_ids <- 1000 diff --git a/data/lifespan.rda b/data/lifespan.rda index 2e3b9e8..91e2fab 100644 Binary files a/data/lifespan.rda and b/data/lifespan.rda differ diff --git a/news.md b/news.md index a04a501..1f3aeaf 100644 --- a/news.md +++ b/news.md @@ -1,4 +1,4 @@ -# galamm (development versions) +# galamm version 0.2.0 - The print.summary.galamm() method does no longer print residual percentiles with mixed response models. The version implemented until now had a bug, and