aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-10-25 23:03:42 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2022-10-25 23:03:42 +0200
commite87e3677554b8845209b8d71d0ab7faca7951943 (patch)
tree5f88e4610f702e1786a116c4e5ada0146607edd6
parent6434fc856c62355f49f87b77d891ef00a38da22c (diff)
Round also for nlme print method...
-rw-r--r--tests/testthat/print_dfop_nlme_1.txt4
-rw-r--r--tests/testthat/test_mixed.R11
2 files changed, 8 insertions, 7 deletions
diff --git a/tests/testthat/print_dfop_nlme_1.txt b/tests/testthat/print_dfop_nlme_1.txt
index 435ff409..ccb43b86 100644
--- a/tests/testthat/print_dfop_nlme_1.txt
+++ b/tests/testthat/print_dfop_nlme_1.txt
@@ -26,5 +26,5 @@ Variance function:
Structure: Constant plus proportion of variance covariate
Formula: ~fitted(.)
Parameter estimates:
- const prop
- 0.92275475 -0.04804649
+ const prop
+ 0.9227472 -0.0480500
diff --git a/tests/testthat/test_mixed.R b/tests/testthat/test_mixed.R
index ce142875..de030199 100644
--- a/tests/testthat/test_mixed.R
+++ b/tests/testthat/test_mixed.R
@@ -1,5 +1,11 @@
context("Nonlinear mixed-effects models")
+# Round error model parameters as they are not rounded in print methods
+dfop_nlme_1$modelStruct$varStruct$const <-
+ signif(dfop_nlme_1$modelStruct$varStruct$const, 3)
+dfop_nlme_1$modelStruct$varStruct$prop <-
+ signif(dfop_nlme_1$modelStruct$varStruct$prop, 4)
+
test_that("Print methods work", {
expect_known_output(print(fits[, 2:3], digits = 2), "print_mmkin_parent.txt")
expect_known_output(print(mixed(mmkin_sfo_1), digits = 2), "print_mmkin_sfo_1_mixed.txt")
@@ -10,11 +16,6 @@ test_that("Print methods work", {
test_that("nlme results are reproducible to some degree", {
- # Round error model parameters as they are not rounded in the summary
- dfop_nlme_1$modelStruct$varStruct$const <-
- signif(dfop_nlme_1$modelStruct$varStruct$const, 3)
- dfop_nlme_1$modelStruct$varStruct$prop <-
- signif(dfop_nlme_1$modelStruct$varStruct$prop, 4)
test_summary <- summary(dfop_nlme_1)
test_summary$nlmeversion <- "Dummy 0.0 for testing"
test_summary$mkinversion <- "Dummy 0.0 for testing"

Contact - Imprint