Skip to content

[Bug]: Kenward-Roger-Linear is not a valid setting for the 'Adjustment Method' in the mmrm call #1456

Description

@jacp1

What happened?

Using module tm_a_mmrm, select adjustment to be 'Kenward-Roger-Linear' . This produces error

'arg' should be one of “Satterthwaite”, “Kenward-Roger”, “Residual”, “Between-Within” 
 when evaluating qenv code:
fit <- tern.mmrm::fit_mmrm(vars = list(response = "CHG", covariates = "BASE", id = "USUBJID", arm = "ACTARM", visit = "AVISIT"), data = anl, conf_level = 0.95, method = "Kenward-Roger-Linear", cor_struct = "unstructured", weights_emmeans = "proportional", parallel = TRUE)

instead of doing the calculations.

Note that the underlying mmrm call can take a parameter 'vcov' which can be set to 'Kenward-Roger-Linear', but the 'method' parameter cannot. It would be useful to set vcov as well as method since that seems to be needed to exactly reproduce the results of a SAS analysis I have

sessionInfo()

R version 4.5.1 (2025-06-13)
Platform: x86_64-pc-linux-gnu
Running under: AlmaLinux 9.6 (Sage Margay)

Matrix products: default
BLAS/LAPACK: FlexiBLAS OPENBLAS-OPENMP;  LAPACK version 3.9.0

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8        LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8   
 [6] LC_MESSAGES=C.UTF-8    LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C           LC_TELEPHONE=C        
[11] LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

time zone: Europe/London
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] teal.reporter_0.6.0          teal.modules.general_0.6.0   ggplot2_4.0.1                teal.modules.clinical_0.12.0
 [5] tern_0.9.10                  rtables_0.6.15               magrittr_2.0.4               formatters_0.5.12           
 [9] teal.transform_0.7.1         teal.widgets_0.5.1           teal_1.1.0                   teal.slice_0.7.1            
[13] teal.data_0.8.0              teal.code_0.7.0              shiny_1.12.1                 teal.logger_0.4.1           

loaded via a namespace (and not attached):
 [1] tidyselect_1.2.1      dplyr_1.1.4           farver_2.1.2          S7_0.2.1              fastmap_1.2.0        
 [6] promises_1.5.0        shinyjs_2.1.0         digest_0.6.39         tern.mmrm_0.3.3       mime_0.13            
[11] lifecycle_1.0.4       survival_3.8-3        compiler_4.5.1        rlang_1.1.6           bsicons_0.1.2        
[16] sass_0.4.10           tools_4.5.1           yaml_2.3.10           mmrm_0.3.16           knitr_1.50           
[21] RColorBrewer_1.1-3    withr_3.0.2           purrr_1.2.0           shinyWidgets_0.9.0    grid_4.5.1           
[26] xtable_1.8-4          nestcolor_0.1.3       scales_1.4.0          cli_3.6.5             ragg_1.5.0           
[31] generics_0.1.4        otel_0.2.0            rstudioapi_0.17.1     tzdb_0.5.0            cachem_1.1.0         
[36] splines_4.5.1         parallel_4.5.1        vctrs_0.6.5           Matrix_1.7-3          jsonlite_2.0.0       
[41] hms_1.1.4             systemfonts_1.3.1     fontawesome_0.5.3     tidyr_1.3.2           jquerylib_0.1.4      
[46] glue_1.8.0            parallelly_1.46.0     cowplot_1.2.0         stringi_1.8.7         gtable_0.3.6         
[51] later_1.4.4           shinycssloaders_1.1.0 tibble_3.3.0          logger_0.4.1          pillar_1.11.1        
[56] htmltools_0.5.9       R6_2.6.1              TMB_1.9.19            textshaping_1.0.4     Rdpack_2.6.4         
[61] evaluate_1.0.5        lattice_0.22-7        haven_2.5.5           readr_2.1.6           rbibutils_2.4        
[66] backports_1.5.0       memoise_2.0.1         broom_1.0.11          httpuv_1.6.16         bslib_0.9.0          
[71] Rcpp_1.1.0            nlme_3.1-168          checkmate_2.3.3       xfun_0.55             fs_1.6.6             
[76] forcats_1.0.1         pkgconfig_2.0.3

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions