Releases: openpharma/mmrm
Releases · openpharma/mmrm
v0.3.17
Miscellaneous
- Added
Rcppspecific flag to avoid warnings when using the upcoming new version ofRcpp.
What's Changed
- Prevent Rcpp from masking valid uses of Rf_error by @Enchufa2 in #556
- New minor release by @danielinteractive in #557
New Contributors
Full Changelog: v0.3.16...v0.3.17
v0.3.16
New Features
Anova.mmrm()now has atest.statisticargument allowing the user to choose the Chi-squared test as opposed to the default F-test.mmrm_control()now has adisable_theta_vcovargument allowing the user to disable computation of the variance-covariance matrix of the covariance parameters. In that case, thenlminboptimizer cannot be used and other optimizers should be selected. Avoiding this computation can be useful in cases where the number of covariance parameters is large and computation of this very large matrix is slow and memory-intensive.model.frame()has a new argumentexcludewhich allows to exclude specific model variables from the returned data frame, after creating the initialmodel.frame. This is useful when the same rows should be kept as in the original model fit (e.g. afterna.actionhas been applied), but some variables are not needed in the returned data frame. Thetermsattribute of the returned data frame is updated accordingly.
Bug Fixes
- Previously, the compound symmetry correlation models (
csandcsh) could have divergence issues, especially when the correlation was negative. This was because the range of the correlation parameter was from -1 to 1, whereas the correct range is between -1/(m-1) and 1, where m is the number of observations per subject. This is fixed now by using another mapping from the real line to the correct range, and therefore compound symmetry correlation models will work more robustly. - Previously, the
predict()method failed when requesting an unconditional prediction interval. This is fixed now. - Previously, the
emp_start()starting values could only work with variables included directly indata. Now they can also work when variables are not included indatabut are available in the parent environment: The variables will be correctly included in the design matrix. This is achieved by an internal update toh_mmrm_tmb_data(). - Previously, the
model.frame()method failed when the model formula included variables from the environment. This is fixed now. In addition, whereasmodel.frame()used to applyna.actionbefore processing theincludeargument,na.actionis now applied afterwards. As a result, any variables excluded fromincludeare no longer considered whenna.actionis applied. Therefore, in the default case whenna.action = "na.omit", this can lead to more rows being kept in the returned data frame compared to previous versions. - Previously, the
model.frame()method did not pass on additional arguments to themodel.frame.default()method, e.g.subset. This is fixed now. - Previously, the
vcov()method returned the asymptotic covariance matrix, even if an adjusted one has been used. This is now fixed and the requested adjusted covariance matrix will be returned. (Please note this was not an issue for downstreamsummary()oremmeans()calls, where the adjusted covariance matrix was correctly used.) - Previously, type 3 tests in the
Anova.mmrm()method could give incorrect results which were not compatible with results fromlme4::lmer()or other software (e.g. when using other than treatment contrasts). This is fixed now. In particular, any combination of contrasts can be used and will yield consistent results. Anova.mmrm()can now handle intercept-free models in type 2 tests, even when the first effect containing a categorical variable has an aliased parameter.- Previously, the naming conventions used in the
Anova.mmrm()method were not recognized bybroom::tidy(). This is fixed now by using more standard names for the resulting data frame columns (e.g.Finstead ofF Statisticetc.) logLik.mmrm_tmb()now includes annobsattribute containing the number of subjects in the provided model (i.e.,component(mmrm_object, "n_subjects")). As a result,BIC(logLik(mmrm_object))can now be successfully calculated.
What's Changed
- 517: fix
cs,cshcorrelation range by @danielinteractive in #518 - Adding anova.mmrm by @NikKrieger in #519
- Augment logLik with attributes by @NikKrieger in #521
- Fit data utilities and diagnostics. by @NikKrieger in #522
- helpers for determining LRT suitability by @NikKrieger in #526
- Add h_refit_mmrm() and h_generate_new_name() by @NikKrieger in #528
- 523: add antedependence tests by @danielinteractive in #530
- 524:
vcov()now returns adjusted covariance matrix by @danielinteractive in #531 - Added anova.mmrm(). Moved tests to test-mmrm-methods by @NikKrieger in #529
- 525: make
predictwork when response is missing by @danielinteractive in #527 - Extend the
mmrmmethod forcar::Anova()by @NikKrieger in #536 - Remove duplicate tests from test-tmb-methods by @NikKrieger in #535
- make h_get_minimal_fit_data() extract names from calls by @NikKrieger in #537
- fix nesting checks for interaction terms by @NikKrieger in #534
- 543: add
disable_theta_vcovoption by @danielinteractive in #544 - 502: refactor Anova type 3 calculations by @danielinteractive in #545
- 546:
model.frame()supports environment variables in formulas by @danielinteractive in #547 - 548: Fix
model.frame()behavior for missing values by @danielinteractive in #549 - Attempt to fix type-2 0-row contrast matrices by @NikKrieger in #552
- 550: Clarify error message when factor is required by @danielinteractive in #553
- New release by @danielinteractive in #554
New Contributors
- @NikKrieger made their first contribution in #519
Full Changelog: v0.3.15...v0.3.16
v0.3.15
New Features
mmrmnow returns score per subject in empirical covariance. It can be accessed bycomponent(obj, name = "score_per_subject").
Bug Fixes
- Previously, when fitting a model with empirical covariance matrix estimation to a data set with a large number of subjects and/or a large number of coefficients, the model fitting could take very long and exhaust the memory in the worst case. This was due to an inefficient implementation of a matrix needed only in case of Satterthwaite degrees of freedom adjustment. This is fixed now, by returning the matrix
empirical_g_matin themmrmobject, instead of the previousempirical_df_matmatrix. The model fit is now much faster and does not exhaust the memory anymore. If old model fit objects are used, theempirical_df_matwill still be used correctly, however a deprecation warning will be issued. Please consider re-fitting the model to get the newempirical_g_matmatrix. - Previously, when compiling
mmrmfrom source using aTMBversion below 1.9.15, and installing a newerTMBof version 1.9.15 or above, would render themmrmpackage unusable. This is fixed now, by checking in the dynamic library ofmmrmwhether the version ofTMBhas been sufficient.
What's Changed
- 476: be more robust against TMB version/order by @danielinteractive in #478
- return meat per subject when computing empirical covariance matrix of coefficients by @zhangh12 in #495
- Update DESCRIPTION by @clarkliming in #498
- 506: optimize empirical vcov / Satterthwaite d.f. calculations by @danielinteractive in #507
- Fix AR correlation structure in
glscalls by @KonstantinLang in #512 - 515: release 0.3.15 by @danielinteractive in #516
New Contributors
- @zhangh12 made their first contribution in #495
- @KonstantinLang made their first contribution in #512
Full Changelog: v0.3.14...v0.3.15
v0.3.14
Bug Fixes
- In version 0.3.13, when the tape optimizer from
TMBwas switched on, a warning would be given byfit_mmrm(), instructing users to turn off the tape optimizer. However, this is not necessary for reproducible results. Instead, it is now checked whether the deterministic hash for theTMBtape optimizer is used, and a warning is issued otherwise. - In version 0.3.13, the above described warning by
fit_mmrm()was not visible to the user when callingmmrm()because it was caught internally, causing the first fit in each session to fail for the first tried optimizer and falling back to the other optimizers. The warning is now issued directly bymmrm(). This change ensures that the first model fit is consistent regarding the chosen optimizer (and thus numeric results) with subsequent model fits, avoiding discrepancies observed in version 0.3.13.
What's Changed
- 472: fix TMB option warning by @danielinteractive in #473
- add Lukas as contributor, bump up version, polish news by @danielinteractive in #475
Full Changelog: v0.3.13...v0.3.14
v0.3.13
Bug Fixes
- When running with
TMBpackage versions below 1.9.15, MMRM fit results are not completely reproducible. While this may not be relevant for most applications, because the numerical differences are very small, we now issue a warning to the user if this is the case. We advise users to upgrade theirTMBpackage versions to 1.9.15 or higher to ensure reproducibility. - Previously,
mmrmignored contrasts defined for covariates in the input data set. This is fixed now. - Previously,
predictalways required the response to be valid, even for unconditional predictions. This is fixed now and unconditional prediction does not require the response to be valid or present any longer. model.framehas been updated to ensure that thena.actionworks correctly.- Previously
emmeans::emmeansreturnedNAfor spatial covariance structures. This is fixed now. - Previously
car::Anovagave incorrect results if an interaction term is included and the covariate of interest was not the first categorical variable. This is fixed now. - Previously
car::Anovafailed if the model did not contain an intercept. This is fixed now.
Miscellaneous
- Upon fitting an MMRM, it is checked whether a not reproducible optimization feature of
TMBis turned on. If so, a warning is issued to the user once per session. mmrmnow checks on the positive definiteness of the covariance matrixtheta_vcov. If it is not positive definite, non-convergence is messaged appropriately.model.matrixhas been updated to ensure that theNAvalues are dropped. Additionally, an argumentuse_responseis added to decide whether records withNAvalues in the response should be discarded.predicthas been updated to allow duplicated subject IDs for unconditional prediction.
What's Changed
- fix emmeans on spatial covariance by @clarkliming in #450
- clean up simulations by @clarkliming in #456
- keep contrast using droplevels by @clarkliming in #455
- fix anova type 3 by @clarkliming in #460
- 464: TMB warnings by @danielinteractive in #466
- make unconditional prediction default by @clarkliming in #463
- signal non-convergence if theta_vcov is not positive definite by @danielinteractive in #468
- Create FUNDING.yml by @danielinteractive in #471
- 469 cran by @danielinteractive in #470
Full Changelog: v0.3.12...v0.3.13
v0.3.12
New Features
- Add parameter
conditionalforpredictmethod to control whether the prediction is conditional on the observation or not.
Bug Fixes
- Previously if the left hand side of a model formula is an expression,
predictandsimulatewill fail. This is fixed now.
What's Changed
- add rhub workflow by @danielinteractive in #436
- add conditional arg for predict by @clarkliming in #438
- Adapt missing data sims by @danielinteractive in #443
- docs: Link the coverage badge to the HTML report by @cicdguy in #444
- change email, bump version by @danielinteractive in #447
Full Changelog: v0.3.11...v0.3.12
v0.3.11
Bug Fixes
- Previously if a secondary optimizer fails
mmrmwill fail. This is fixed now. - Previously character covariate variables will make
Anovafail. This is fixed now.
What's Changed
- fix issue of h_record_all_outputs by @clarkliming in #424
- fix anova error by @clarkliming in #427
- remove biocVer by @clarkliming in #429
- update docs by @clarkliming in #428
- Missing data simulations by @danielinteractive in #430
- fix eigen deprecated warning by @clarkliming in #432
- add tests for residual.R, bump up version by @danielinteractive in #433
Full Changelog: v0.3.10...v0.3.11
v0.3.10
Miscellaneous
- Fix internal test skipping functions for MacOS R.
What's Changed
- 419: make skipping code more general to also run on old R versions by @danielinteractive in #420
Full Changelog: v0.3.8...v0.3.10
v0.3.7
Miscellaneous
- In documentation of
mmrm_control(), the allowed vcov definition is corrected to "Empirical-Jackknife" (CR3), and "Empirical-Bias-Reduced" (CR2). - Fix a compiler warning related to missing format specification in error message function call.
Full Changelog: v0.3.6...v0.3.7
v0.3.6
New Features
- The argument
methodofmmrm()now only specifies the method used for the
degrees of freedom adjustment. - Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients
covariance estimates, which can be specified via the newvcovargument ofmmrm(). - Add residual and between-within degrees of freedom methods.
- Add Kenward-Roger support for spatial covariance structures.
- Add
model.matrix()andterms()methods to assist in post-processing. - Add
predict()method to obtain conditional mean estimates and prediction intervals. - Add
simulate()method to simulate observations from the predictive distribution. - Add
residuals()method to obtain raw, Pearson or normalized residuals. - Add
tidy(),glance()andaugment()methods to tidy the fit results into summary tables. - Add
tidymodelsframework support via aparsnipinterface. - Add argument
covariancetommrm()to allow for easier programmatic access
to specifying the model's covariance structure and to expose covariance
customization through thetidymodelsinterface.
Bug Fixes
- Previously
mmrm()follows the global optionna.actionand if it is set
other than"na.omit"an assertion would fail. This is now fixed and henceNA
values are always removed prior to model fitting, independent of the global
na.actionoption. - Previously a
model.frame()call on anmmrmobject with transformed terms, or new
data, e.g.model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data),
would fail. This is now fixed. - Previously
mmrm()always required adataargument. Now fittingmmrmcan also use
environment variables instead of requiringdataargument. (Note that
fit_mmrmis not affected.) - Previously
emmeans()failed when using transformed terms or not including the visit
variable in the model formula. This is now fixed. - Previously
mmrm()might provide non-finite values in the Jacobian calculations,
leading to errors in the Satterthwaite degrees of freedom calculations. This will raise
an error now and thus alert the user that the model fit was not successful.
Miscellaneous
- Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom,
resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit. - Add an interactive confirmation step if the number of visit levels is too large
for non-spatial covariance structures. Useoptions(mmrm.max_visits = )to specify the
maximum number of visits allowed in non-interactive mode. - Removed
free_cores()in favor ofparallelly::availableCores(omit = 1). - The
model.frame()method has been updated: Thefullargument is deprecated and
theincludeargument can be used instead; by default all relevant variables are
returned. Furthermore, it returns adata.framethe size of the number of observations
utilized in the model for all combinations of theincludeargument
whenna.action= "na.omit". - Overall, seven vignettes have been added to the package. All vignettes have a slightly
different look now to reduce the size of the overall R package on CRAN. - The used optimizer is now available via
component(., "optimizer")instead of previously
attr(., "optimizer").
Full Changelog: v0.2.2...v0.3.6