Skip to content

galamm: Generalized Additive Latent and Mixed Models #614

Description

@osorensen

Submitting Author Name: Øystein Sørensen
Submitting Author Github Handle: @osorensen
Repository: https://github.com/LCBC-UiO/galamm
Submission type: Pre-submission
Language: en


  • Paste the full DESCRIPTION file inside a code block below:
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)
RoxygenNote: 7.2.3
Suggests:
    covr,
    gamm4,
    ggplot2,
    knitr,
    PLmixed,
    rmarkdown,
    testthat (>= 3.0.0)
Config/testthat/edition: 3
VignetteBuilder: knitr, rmarkdown
RdMacros: Rdpack
NeedsCompilation: yes
SystemRequirements: C++17

Scope

  • Please indicate which category or categories from our package fit policies or statistical package categories this package falls under. (Please check an appropriate box below):

    Data Lifecycle Packages

    • data retrieval
    • data extraction
    • data munging
    • data deposition
    • data validation and testing
    • workflow automation
    • version control
    • citation management and bibliometrics
    • scientific software wrappers
    • field and lab reproducibility tools
    • database software bindings
    • geospatial data
    • text analysis

    Statistical Packages

    • Bayesian and Monte Carlo Routines
    • Dimensionality Reduction, Clustering, and Unsupervised Learning
    • Machine Learning
    • Regression and Supervised Learning
    • Exploratory Data Analysis (EDA) and Summary Statistics
    • Spatial Analyses
    • Time Series Analyses
  • Explain how and why the package falls under these categories (briefly, 1-2 sentences). Please note any areas you are unsure of:
    The package estimates mixed effect and latent variable models which may include smooth nonlinear terms. Pretty obvious that it's regression software.

  • If submitting a statistical package, have you already incorporated documentation of standards into your code via the srr package?
    No. pkgcheck::pkgcheck() says the package is ready to be submitted, but I have the same issue with the autotest package as described here. Running x <- autotest_package(test = TRUE) gives 6 errors, 5 warnings, and 21 diagnostic messages, as shown below:

> as.data.frame(x) %>% group_by(type) %>% count()
# A tibble: 3 × 2
# Groups:   type [3]
  type           n
  <chr>      <int>
1 diagnostic    21
2 error          6
3 warning        5

For example, the first error has the following entry in the content column, and the other errors are similar.

> as.data.frame(x)[1, "content"]
[1] ":quote(y ~ x + (1 | id)), weights = base::quote(~(1 | : family_mapping must be a vector."

I don't know what this means, and I'm not able to figure it out by reading the documentation and vignettes of the autotest package. Anyhow, since the srr package is supposed to be used after autotest returns NULL, I haven't been able to try it.

  • Who is the target audience and what are scientific applications of this package?
    The target audience is applied statisticians and quantitative scientists, particularly those working on the social sciences. The package is motivated by longitudinal studies in cognitive neuroscience, but it is applicable wherever a measurement model (of factor analysis type) needs to be combined with hierarchical modeling.

  • Are there other R packages that accomplish the same thing? If so, how does yours differ or meet our criteria for best-in-category?
    None that I am aware of. It is possible to implement these types of models using, e.g., Stan or JAGS, and potentially some using OpenMx, but that requires a lot more programming. The package does have overlapping features with other R packages, including lme4, mgcv, PLmixed, gamlss, and lavaan, but the aim of this package is to provide functionality not supported by those packages.

  • (If applicable) Does your package comply with our guidance around Ethics, Data Privacy and Human Subjects Research?

  • Any other questions or issues we should be aware of?:
    I have written this package myself, but I have imported some limited amount of code from packages lme4 and mgcv, as well as the C++ library autodiff. In accordance with the policy stated in Chapter 1.9 of the rOpenSci online book, I have added the authors of those packages as contributors in DESCRIPTION.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions