Skip to content

Commit

Permalink
update summary.cosinor test and snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
RWParsons committed Aug 19, 2024
1 parent 4fc4856 commit e42fd7d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 33 deletions.
62 changes: 31 additions & 31 deletions tests/testthat/_snaps/summary.cosinor.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@
---

Code
print(print_obj, digits = 2)
print(print_obj, digits = 1)
Output
Conditional Model
Raw model coefficients:
estimate standard.error lower.CI upper.CI p.value
(Intercept) 30.33 0.38 29.59 31.1 <2e-16 ***
X0:main_rrr1 0.95 0.62 -0.27 2.2 0.1
X1:main_rrr1 6.60 0.98 4.67 8.5 2e-11 ***
X0:main_sss1 6.28 0.70 4.91 7.7 <2e-16 ***
X1:main_sss1 4.58 0.93 2.75 6.4 1e-06 ***
(Intercept) 30.3 0.4 29.6 31 <2e-16 ***
X0:main_rrr1 1.0 0.6 -0.3 2 0.1
X1:main_rrr1 6.6 1.0 4.7 8 2e-11 ***
X0:main_sss1 6.3 0.7 4.9 8 <2e-16 ***
X1:main_sss1 4.6 0.9 2.7 6 1e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Transformed coefficients:
estimate standard.error lower.CI upper.CI p.value
(Intercept) 30.328 0.375 29.593 31.1 <2e-16 ***
[X=0]:amp1 6.351 0.697 4.985 7.7 <2e-16 ***
[X=1]:amp1 8.030 0.926 6.214 9.8 <2e-16 ***
[X=0]:acr1 1.420 0.098 1.227 1.6 <2e-16 ***
[X=1]:acr1 0.607 0.123 0.365 0.8 8e-07 ***
(Intercept) 30.3 0.4 29.6 31.1 <2e-16 ***
[X=0]:amp1 6.3 0.7 5.0 7.7 <2e-16 ***
[X=1]:amp1 8.0 0.9 6.2 9.8 <2e-16 ***
[X=0]:acr1 1.4 0.1 1.2 1.6 <2e-16 ***
[X=1]:acr1 0.6 0.1 0.4 0.8 8e-07 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Expand All @@ -57,21 +57,21 @@
Dispersion Model
Raw model coefficients:
estimate standard.error lower.CI upper.CI p.value
(Intercept) 1.657 0.050 1.558 1.8 <2e-16 ***
X0:disp_rrr1 0.189 0.090 0.012 0.4 0.04 *
X1:disp_rrr1 -0.041 0.123 -0.281 0.2 0.74
X0:disp_sss1 0.052 0.099 -0.141 0.2 0.60
X1:disp_sss1 0.028 0.117 -0.201 0.3 0.81
(Intercept) 1.66 0.05 1.56 1.8 <2e-16 ***
X0:disp_rrr1 0.19 0.09 0.01 0.4 0.04 *
X1:disp_rrr1 -0.04 0.12 -0.28 0.2 0.74
X0:disp_sss1 0.05 0.10 -0.14 0.2 0.60
X1:disp_sss1 0.03 0.12 -0.20 0.3 0.81
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Transformed coefficients:
estimate standard.error lower.CI upper.CI p.value
(Intercept) 1.657 0.050 1.558 1.8 <2e-16 ***
[X=0]:amp1 0.196 0.086 0.027 0.4 0.02 *
[X=1]:amp1 0.050 0.121 -0.188 0.3 0.68
[X=0]:acr1 0.269 0.521 -0.753 1.3 0.61
[X=1]:acr1 2.539 2.379 -2.124 7.2 0.29
(Intercept) 1.66 0.05 1.56 1.8 <2e-16 ***
[X=0]:amp1 0.20 0.09 0.03 0.4 0.02 *
[X=1]:amp1 0.05 0.12 -0.19 0.3 0.68
[X=0]:acr1 0.27 0.52 -0.75 1.3 0.61
[X=1]:acr1 2.54 2.38 -2.12 7.2 0.29
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Expand All @@ -80,17 +80,17 @@
Zero-Inflation Model
Raw model coefficients:
estimate standard.error lower.CI upper.CI p.value
(Intercept) -2.2e+01 5.0e+03 -9.8e+03 9742 1
X0:zi_rrr1 -1.5e+00 6.9e+03 -1.4e+04 13508 1
X1:zi_rrr1 8.7e-02 1.1e+04 -2.1e+04 21286 1
X0:zi_sss1 7.3e-01 7.0e+03 -1.4e+04 13636 1
X1:zi_sss1 2.6e-01 1.0e+04 -2.0e+04 20486 1
(Intercept) -2e+01 5e+03 -1e+04 9742 1
X0:zi_rrr1 -2e+00 7e+03 -1e+04 13508 1
X1:zi_rrr1 9e-02 1e+04 -2e+04 21286 1
X0:zi_sss1 7e-01 7e+03 -1e+04 13636 1
X1:zi_sss1 3e-01 1e+04 -2e+04 20486 1
Transformed coefficients:
estimate standard.error lower.CI upper.CI p.value
(Intercept) -2.2e+01 5.0e+03 -9.8e+03 9742 1
[X=0]:amp1 1.7e+00 7.1e+03 -1.4e+04 13939 1
[X=1]:amp1 2.8e-01 1.0e+04 -2.0e+04 20198 1
[X=0]:acr1 2.7e+00 4.0e+03 -7.9e+03 7893 1
[X=1]:acr1 1.2e+00 3.9e+04 -7.7e+04 77144 1
(Intercept) -2e+01 5e+03 -1e+04 9742 1
[X=0]:amp1 2e+00 7e+03 -1e+04 13939 1
[X=1]:amp1 3e-01 1e+04 -2e+04 20198 1
[X=0]:acr1 3e+00 4e+03 -8e+03 7893 1
[X=1]:acr1 1e+00 4e+04 -8e+04 77144 1

Binary file modified tests/testthat/fixtures/multi_model.rds
Binary file not shown.
Binary file modified tests/testthat/fixtures/simple_model.rds
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/testthat/test-summary.cosinor.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_that("summary print works", {
# withr::local_seed(50)
# withr::local_seed(42)
# simple_model <- cglmm(
# vit_d ~ amp_acro(time, group = "X", period = 12),
# data = vitamind
Expand All @@ -21,5 +21,5 @@ test_that("summary print works", {
expect_true(inherits(print_obj, "cglmmSummary"))

print_obj <- summary(multi_model)
expect_snapshot(print(print_obj, digits = 2))
expect_snapshot(print(print_obj, digits = 1))
})

0 comments on commit e42fd7d

Please sign in to comment.