ropensci / software-review

rOpenSci Software Peer Review.
291 stars 104 forks source link

galamm: Generalized Additive Latent and Mixed Models #615

Open osorensen opened 11 months ago

osorensen commented 11 months ago

Submitting Author Name: Øystein Sørensen Submitting Author Github Handle: !--author1-->@osorensen<!--end-author1-- Repository: https://github.com/LCBC-UiO/galamm Version submitted: 0.1.1.9000 Submission type: Stats Badge grade: gold Editor: !--editor-->@noamross<!--end-editor-- Reviewers: TBD

Archive: TBD Version accepted: TBD Language: en

Package: galamm
Title: Generalized Additive Latent and Mixed Models
Version: 0.1.1.9000
Authors@R: c(
    person(given = "Øystein",
           family = "Sørensen",
           role = c("aut", "cre"),
           email = "oystein.sorensen@psykologi.uio.no",
           comment = c(ORCID = "0000-0003-0724-3542")),
    person(given = "Douglas", family = "Bates", role = "ctb"),       
    person(given = "Ben", family = "Bolker", role = "ctb"),
    person(given = "Martin", family = "Maechler", role = "ctb"),
    person(given = "Allan", family = "Leal", role = "ctb"),
    person(given = "Fabian", family = "Scheipl", role = "ctb"),
    person(given = "Steven", family = "Walker", role = "ctb"),
    person(given = "Simon", family = "Wood", role = "ctb")
           )
Description: Estimates generalized additive latent and
    mixed models using maximum marginal likelihood, 
    as defined in Sorensen et al. (2023) 
    <doi:10.1007/s11336-023-09910-z>, which is an extension of Rabe-Hesketh and
    Skrondal (2004)'s unifying framework for multilevel latent variable 
    modeling <doi:10.1007/BF02295939>. Efficient computation is done using sparse 
    matrix methods, Laplace approximation, and automatic differentiation. The 
    framework includes generalized multilevel models with heteroscedastic 
    residuals, mixed response types, factor loadings, smoothing splines, 
    crossed random effects, and combinations thereof. Syntax for model 
    formulation is close to 'lme4' (Bates et al. (2015) 
    <doi:10.18637/jss.v067.i01>) and 'PLmixed' (Rockwood and Jeon (2019) 
    <doi:10.1080/00273171.2018.1516541>).
License: GPL (>= 3)
URL: https://github.com/LCBC-UiO/galamm, https://lcbc-uio.github.io/galamm/
BugReports: https://github.com/LCBC-UiO/galamm/issues
Encoding: UTF-8
Imports: 
    lme4,
    Matrix,
    memoise,
    methods,
    mgcv,
    nlme,
    Rcpp,
    Rdpack,
    stats
Depends:
    R (>= 3.5.0)
LinkingTo:
    Rcpp,
    RcppEigen
LazyData: true
Roxygen: list(markdown = TRUE, roclets = c ("namespace", "rd", "srr::srr_stats_roclet"))
RoxygenNote: 7.2.3
Suggests:
    covr,
    gamm4,
    knitr,
    PLmixed,
    rmarkdown,
    testthat (>= 3.0.0)
Config/testthat/edition: 3
VignetteBuilder: knitr, rmarkdown
RdMacros: Rdpack
NeedsCompilation: yes
SystemRequirements: C++17

Scope

Pre-submission Inquiry

General Information

This is the first implementation of the algorithm developed in Sørensen, Fjell, and Walhovd (2023).

Badging

Technical checks

Confirm each of the following by checking the box.

This package:

Publication options

Code of conduct

ropensci-review-bot commented 11 months ago

Thanks for submitting to rOpenSci, our editors and @ropensci-review-bot will reply soon. Type @ropensci-review-bot help for help.

ropensci-review-bot commented 11 months ago

:rocket:

Editor check started

:wave:

ropensci-review-bot commented 11 months ago

Checks for galamm (v0.1.1.9000)

git hash: 26cfad15

(Checks marked with :eyes: may be optionally addressed.)

Package License: GPL (>= 3)


1. rOpenSci Statistical Standards (srr package)

:heavy_check_mark: All applicable standards [v0.2.0] have been documented in this package (217 complied with; 0 N/A standards)


2. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate. |type |package | ncalls| |:----------|:---------|------:| |internal |base | 439| |internal |galamm | 76| |internal |utils | 30| |internal |graphics | 6| |imports |stats | 79| |imports |lme4 | 11| |imports |Matrix | 11| |imports |mgcv | 8| |imports |methods | 3| |imports |nlme | 3| |imports |memoise | 1| |imports |Rcpp | NA| |imports |Rdpack | NA| |suggests |covr | NA| |suggests |gamm4 | NA| |suggests |knitr | NA| |suggests |PLmixed | NA| |suggests |rmarkdown | NA| |suggests |testthat | NA| |linking_to |Rcpp | NA| |linking_to |RcppEigen | NA| Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats()', and examining the 'external_calls' table.

base

list (31), seq_along (22), for (19), lapply (19), length (18), c (17), names (15), ncol (15), attr (14), seq_len (14), vapply (14), if (13), drop (11), rep (11), as.numeric (10), is.null (9), nrow (9), integer (8), unlist (8), factor (7), paste (7), qr (7), diff (6), max (6), seq (6), all.vars (5), any (5), matrix (5), numeric (5), cbind (4), colnames (4), logical (4), sqrt (4), beta (3), eval (3), grepl (3), levels (3), Map (3), match.call (3), Reduce (3), return (3), row.names (3), scale (3), unique (3), by (2), col (2), data.frame (2), diag (2), do.call (2), ifelse (2), lengths (2), order (2), parent.frame (2), qr.R (2), rank (2), rbind (2), abs (1), array (1), as.character (1), as.integer (1), as.logical (1), as.matrix (1), assign (1), backsolve (1), deparse (1), deparse1 (1), dim (1), environment (1), getOption (1), inherits (1), intersect (1), is.infinite (1), is.nan (1), min (1), parse (1), pmax (1), qr.qty (1), regexpr (1), rep.int (1), rowSums (1), setdiff (1), split (1), sum (1), t (1), tabulate (1), which (1)

stats

deviance (9), pf (8), formula (6), as.formula (4), BIC (4), family (4), logLik (4), model.matrix (4), weights (4), quantile (3), terms (3), AIC (2), nobs (2), rf (2), terms.formula (2), contrasts (1), D (1), delete.response (1), df (1), gaussian (1), getCall (1), model.frame (1), model.response (1), na.action (1), optim (1), pchisq (1), pnorm (1), qnorm (1), reformulate (1), smooth (1), start (1), update (1), vcov (1)

galamm

extractor (3), factor_finder (3), find_parm_inds (3), fn (3), gr (3), mlwrapper (3), define_factor_mappings (2), extend_lambda (2), extract_name (2), find_k (2), gam.setup (2), gamm4 (2), gamm4.setup (2), interpret.gam0 (2), set_initial_values (2), setup_factor (2), anova.galamm (1), coef.galamm (1), confint.galamm (1), deviance.galamm (1), extract_optim_parameters (1), extract_optim_parameters.galamm (1), factor_loadings (1), factor_loadings.galamm (1), family.galamm (1), fitted.galamm (1), fixef.galamm (1), formula.galamm (1), galamm (1), galamm_control (1), gam.side (1), gamm4.wrapup (1), llikAIC (1), logLik.galamm (1), mappingunwrapping (1), marginal_likelihood (1), new_galamm_control (1), nobs.galamm (1), plot_smooth (1), plot_smooth.galamm (1), plot.galamm (1), predict.galamm (1), print.summary.galamm (1), print.VarCorr.galamm (1), ranef.galamm (1), release_questions (1), residuals.galamm (1), setup_family (1), setup_response_object (1), sl (1), squeeze_mappings (1), t2l (1), VarCorr.galamm (1), variable.summary (1)

utils

data (30)

lme4

findbars (3), nobars (3), lFormula (2), mkReTrms (2), .prt.VC (1)

Matrix

t (4), chol (2), Matrix (2), solve (2), Diagonal (1)

mgcv

new.name (2), smooth2random (2), Rrank (1), s (1), smoothCon (1), t2 (1)

graphics

par (3), abline (2), text (1)

methods

as (3)

nlme

fixef (1), ranef (1), VarCorr (1)

memoise

memoise (1)

**NOTE:** Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately.


3. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has: - code in C++ (4% in 2 files), C/C++ Header (66% in 18 files) and R (29% in 30 files) - 1 authors - 9 vignettes - 8 internal data files - 9 imported packages - 31 exported functions (median 6 lines of code) - 81 non-exported functions in R (median 16 lines of code) - 618 C/C++ functions (median 4 lines of code) --- Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used: - `loc` = "Lines of Code" - `fn` = "function" - `exp`/`not_exp` = exported / not exported All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by [the `checks_to_markdown()` function](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) The final measure (`fn_call_network_size`) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile. |measure | value| percentile|noteworthy | |:------------------------|------:|----------:|:----------| |files_R | 30| 89.3| | |files_src | 2| 79.1| | |files_inst | 18| 99.6| | |files_vignettes | 9| 99.2| | |files_tests | 10| 90.7| | |loc_R | 1777| 81.8| | |loc_src | 252| 31.9| | |loc_inst | 4014| 86.1| | |loc_vignettes | 1732| 96.3|TRUE | |loc_tests | 2479| 95.4|TRUE | |num_vignettes | 9| 99.6|TRUE | |data_size_total | 265405| 88.8| | |data_size_median | 13688| 80.9| | |n_fns_r | 112| 79.1| | |n_fns_r_exported | 31| 79.2| | |n_fns_r_not_exported | 81| 79.5| | |n_fns_src | 618| 96.1|TRUE | |n_fns_per_file_r | 2| 39.7| | |n_fns_per_file_src | 24| 95.1|TRUE | |num_params_per_fn | 2| 11.9| | |loc_per_fn_r | 12| 36.1| | |loc_per_fn_r_exp | 6| 10.5| | |loc_per_fn_r_not_exp | 16| 52.7| | |loc_per_fn_src | 4| 2.0|TRUE | |rel_whitespace_R | 18| 80.9| | |rel_whitespace_src | 14| 29.1| | |rel_whitespace_inst | 24| 85.7| | |rel_whitespace_vignettes | 51| 99.2|TRUE | |rel_whitespace_tests | 11| 88.9| | |doclines_per_fn_exp | 42| 52.8| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 1302| 98.5|TRUE | ---

3a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


4. goodpractice and other checks

Details of goodpractice checks (click to open)

#### 3a. Continuous Integration Badges [![R-CMD-check.yaml](https://github.com/LCBC-UiO/galamm/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/LCBC-UiO/galamm/actions) **GitHub Workflow Results** | id|name |conclusion |sha | run_number|date | |----------:|:--------------------------|:----------|:------|----------:|:----------| | 6584930507|lint |success |26cfad | 495|2023-10-20 | | 6584967181|pages build and deployment |success |2fba91 | 144|2023-10-20 | | 6584930514|pkgdown |success |26cfad | 350|2023-10-20 | | 6584930510|R-CMD-check |success |26cfad | 558|2023-10-20 | | 6584930523|test-coverage |success |26cfad | 248|2023-10-20 | --- #### 3b. `goodpractice` results #### `R CMD check` with [rcmdcheck](https://r-lib.github.io/rcmdcheck/) R CMD check generated the following note: 1. checking installed package size ... NOTE installed size is 34.0Mb sub-directories of 1Mb or more: doc 2.0Mb libs 30.7Mb R CMD check generated the following check_fail: 1. rcmdcheck_reasonable_installed_size #### Test coverage with [covr](https://covr.r-lib.org/) Package coverage: 98.35 #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) The following functions have cyclocomplexity >= 15: function | cyclocomplexity --- | --- galamm | 45 gam.setup | 44 gamm4.wrapup | 44 interpret.gam0 | 29 define_factor_mappings | 17 galamm_control | 17 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found the following 296 potential issues: message | number of times --- | --- Avoid library() and require() calls in packages | 10 Lines should not be more than 80 characters. | 286


5. Other Checks

Details of other checks (click to open)

:heavy_multiplication_x: The following 2 function names are duplicated in other packages: - - `plot_smooth` from itsadug - - `sl` from reinsureR


Package Versions

|package |version | |:--------|:---------| |pkgstats |0.1.3.9 | |pkgcheck |0.1.2.10 | |srr |0.0.1.194 |


Editor-in-Chief Instructions:

This package is in top shape and may be passed on to a handling editor

osorensen commented 9 months ago

👋 @noamross, I just wanted to ask: what's the status of this submission? Is rOpenSci interested in reviewing it?

noamross commented 9 months ago

@osorensen, thanks for following up. My apologies, I think this package fell between cracks in our editor hand-off. I'll follow up later today.

mpadge commented 5 months ago

@osorensen Apologies once again, with recent organisational changes this once again fell through the cracks. We are now finally on it. How are you positioned if we finally get the process started now?

osorensen commented 5 months ago

@mpadge, a paper describing the package is currently under review for a journal, so I think my best option now is the withdraw the submission to ropensci. I can maybe just to that by closing this issue?

mpadge commented 5 months ago

@osorensen We'd still like to work with you to get this through our review process. How about one of the following options:

  1. We put the submission on hold here, until you let us know when your paper has passed through review. We'll then re-start the official review process straight after then. Or,
  2. We start the review process anyway. Our reviews are generally completed within just a few months at most. Especially given our slow response thus far, we'd ensure that our process would be completed well before a typical manuscript review. (Some good examples for recent stats submissions are #550 and #571, both done in around 2 months.) All changes and software improvements during our review could be used to support your responses to manuscript reviews.

Note that if your submission is to Journal of Statistical Software, then our system has been developed in collaboration with their processes, and they would likely welcome you using the results of a review here to support their own process.

osorensen commented 5 months ago

Thanks @mpadge, I go for option 1 then, and will ping you here once I've got a final decision on the paper.

markean commented 4 months ago

@osorensen We'd still like to work with you to get this through our review process. How about one of the following options:

  1. We put the submission on hold here, until you let us know when your paper has passed through review. We'll then re-start the official review process straight after then. Or,
  2. We start the review process anyway. Our reviews are generally completed within just a few months at most. Especially given our slow response thus far, we'd ensure that our process would be completed well before a typical manuscript review. (Some good examples for recent stats submissions are Submission - melt: Multiple Empirical Likelihood Tests #550 and waywiser: Ergonomic Methods for Assessing Spatial Models #571, both done in around 2 months.) All changes and software improvements during our review could be used to support your responses to manuscript reviews.

Note that if your submission is to Journal of Statistical Software, then our system has been developed in collaboration with their processes, and they would likely welcome you using the results of a review here to support their own process.

@mpadge, I just stumbled upon this notification. Thank you for mentioning my package review case. The peer review process has significantly enhanced the package's quality in a very short period of time, and I also believe this has expedited its review for publication in the Journal of Statistical Software.

osorensen commented 1 month ago

@mpadge, the software paper is now published in Multivariate Behavioral Research, https://doi.org/10.1080/00273171.2024.2385336. We can therefore start this review now.

adamhsparks commented 1 month ago

@ropensci-review-bot check srr

adamhsparks commented 1 month ago

@ropensci-review-bot check srr

maelle commented 1 month ago

@ropensci-review-bot check srr

adamhsparks commented 1 month ago

@ropensci-review-bot check srr

mpadge commented 1 month ago

@adamhsparks @osorensen Sorry for any inconvenience. The non-responsive bot was a bug on our side that has now been fixed. It should all work now when you call check srr again.

maelle commented 1 month ago

@ropensci-review-bot check srr

ropensci-review-bot commented 1 month ago

:heavy_multiplication_x: Error: Package documents compliance only with general standards. Statistical packages must document compliance with at least one set of category-specific standards as well.

The following standards are missing:

General standards:

G5.2, G5.2a, G5.2b, G5.3, G5.4a, G5.4b, G5.5, G5.6

All standards must be documented prior to submission

osorensen commented 1 month ago

@maelle, the above seems to be a false positive. The mentioned standards are documented here:

https://github.com/LCBC-UiO/galamm/blob/578b52c8a7db11401d98f12a2c21b7fdccc3e37f/tests/testthat.R#L1-L25

adamhsparks commented 1 month ago

@osorensen, unfortunately, that's not a false positive. They are not properly documented so that the bot can find the standards.

The documentation for ROxygen2 needs to be in /R, not /tests for it to be valid, e.g., https://github.com/giovsaraceno/QuadratiK-package/blob/master/R/srr-stats-standards.R

If you just move it, and redocument it should be fine.

osorensen commented 1 month ago

@ropensci-review-bot check srr

mpadge commented 1 month ago

@osorensen Sorry, bot's not quite ready for your case. Yours is the first package we've had with standards in tests/testthat.R. That is of course perfectly okay, but we simply hadn't encountered it, and so didn't realise that it caused a failure on our side. I'll ping here when our system has been rebuilt with the fix.

(And FYI @adamhsparks, "srrstats" tags can go pretty much anywhere at all, including README, tests, src, and R code.)

ropensci-review-bot commented 1 month ago

:heavy_multiplication_x: Error: Package documents compliance only with general standards. Statistical packages must document compliance with at least one set of category-specific standards as well.

'srr' standards compliance:

:heavy_check_mark: This package complies with > 50% of all standads and may be submitted.

osorensen commented 1 month ago

@mpadge, I moved the documentation to R/, so hope it's fine now.

adamhsparks commented 1 month ago

@osorensen Sorry, bot's not quite ready for your case. Yours is the first package we've had with standards in tests/testthat.R. That is of course perfectly okay, but we simply hadn't encountered it, and so didn't realise that it caused a failure on our side. I'll ping here when our system has been rebuilt with the fix.

(And FYI @adamhsparks, "srrstats" tags can go pretty much anywhere at all, including README, tests, src, and R code.)

Sorry, my bad. I was just trying to help based on previous cases.

mpadge commented 1 month ago

@adamhsparks and @osorensen The system has now been rebuilt, and the bot comment above that "This package ... may be submitted" would no longer appear. The first "Error:" would first have to be addressed.

osorensen commented 1 month ago

@adamhsparks and @osorensen The system has now been rebuilt, and the bot comment above that "This package ... may be submitted" would no longer appear. The first "Error:" would first have to be addressed.

@mpadge, this seemed to be fine when I submitted the package, see the srr check in this comment. Have the standards changed since October 2023?

mpadge commented 1 month ago

@osorensen The standards haven't changed, but since that time we've added additional checks to identify packages which only document general standards, with no category-specific ones. The general package checks also now generate and link to the full report on stats standards compliance, like in this example here, so we'd explicitly see there also that compliance statements with regression standards were missing.

So before proceeding, we'd need you to comply with our Regression Standards. Previous experience suggests that'll require around one day's work or so. As always, please let us know if you've got any questions, and in particular, feel free to comment in any way you like regarding the standards, ideally in the stats-devguide repo, linked directly from the book. Thanks!

osorensen commented 1 week ago

@ropensci-review-bot check srr

osorensen commented 1 week ago

@mpadge @adamhsparks, I'm not sure if I'm allowed to run check srr myself, but I've added tags which confirm that the package complies with the regression standards now. They are all in the main branch of my repository. Could you please check if this is sufficient?

mpadge commented 1 week ago

@osorensen Sorry, that was a wee :bug: on our side. Should work now, but note that result will currently indicate that RE4.15 is missing, so maybe add that standard first before calling?

osorensen commented 1 week ago

@ropensci-review-bot check srr

osorensen commented 1 week ago

Thanks @mpadge, there was a typo in there, which should be fixed now. I tried running check srr above but not sure if anything happens.

adamhsparks commented 1 week ago

@ropensci-review-bot check srr

mpadge commented 1 week ago

@ropensci-review-bot check srr

ropensci-review-bot commented 1 week ago

'srr' standards compliance:

:heavy_check_mark: This package complies with > 50% of all standards and may be submitted.

mpadge commented 1 week ago

@osorensen @adamhsparks The previous calls seem to have issued during our weekly system rebuild. Just rotten timing, but all should work fine from here on. And nice work @osorensen - 100% compliance!!

adamhsparks commented 1 week ago

@ropensci-review-bot assign @noamross as editor

ropensci-review-bot commented 1 week ago

Assigned! @noamross is now the editor

noamross commented 6 days ago

@ropensci-review-bot seeking reviewers

ropensci-review-bot commented 6 days ago

Please add this badge to the README of your package repository:

[![Status at rOpenSci Software Peer Review](https://badges.ropensci.org/615_status.svg)](https://github.com/ropensci/software-review/issues/615)

Furthermore, if your package does not have a NEWS.md file yet, please create one to capture the changes made during the review process. See https://devguide.ropensci.org/releasing.html#news