Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update anova type II and III #391

Merged
merged 42 commits into from
Dec 22, 2023
Merged

update anova type II and III #391

merged 42 commits into from
Dec 22, 2023

Conversation

clarkliming
Copy link
Collaborator

@clarkliming clarkliming commented Dec 19, 2023

close #392

@clarkliming clarkliming marked this pull request as ready for review December 19, 2023 12:45
@danielinteractive
Copy link
Collaborator

Thanks @clarkliming , can you add a new issue for this production work? (ideally also with checkboxes for the objectives of that issue) The other issue was only for the design I think

Copy link
Contributor

github-actions bot commented Dec 19, 2023

badge

Code Coverage Summary

Filename                    Stmts    Miss  Cover    Missing
------------------------  -------  ------  -------  -------------------------------
R/between-within.R             59       0  100.00%
R/component.R                  67       0  100.00%
R/cov_struct.R                 97       1  98.97%   407
R/empirical.R                   7       0  100.00%
R/fit.R                       223      11  95.07%   186-189, 407, 450-453, 468, 498
R/interop-car.R                70       2  97.14%   9, 48
R/interop-emmeans.R            39       0  100.00%
R/interop-parsnip.R            59       1  98.31%   12
R/kenwardroger.R               92       2  97.83%   41, 63
R/mmrm-methods.R              120       0  100.00%
R/residual.R                    8       8  0.00%    10-31
R/satterthwaite.R             116      12  89.66%   238-249
R/testing.R                    64       4  93.75%   29, 31, 80, 82
R/tidiers.R                    72       2  97.22%   46-47
R/tmb-methods.R               287       3  98.95%   277-278, 338
R/tmb.R                       287       0  100.00%
R/utils-formula.R              27       0  100.00%
R/utils-nse.R                  16       0  100.00%
R/utils.R                     134      11  91.79%   276-286, 372
R/zzz.R                        70      24  65.71%   7-22, 55-60, 90, 118, 138
src/chol_cache.h               63       0  100.00%
src/covariance.h              101       1  99.01%   177
src/derivatives.h             126       0  100.00%
src/empirical.cpp              72       0  100.00%
src/exports.cpp                47       0  100.00%
src/jacobian.cpp               47       1  97.87%   54
src/kr_comp.cpp                56       0  100.00%
src/mmrm.cpp                   76       0  100.00%
src/predict.cpp                93       0  100.00%
src/test-chol_cache.cpp        58       5  91.38%   9, 18, 26, 55, 62
src/test-covariance.cpp       123       5  95.93%   9, 29, 40, 61, 72
src/test-derivatives.cpp      108       7  93.52%   44, 53, 62, 85, 94, 106, 124
src/test-utils.cpp            195       7  96.41%   9, 16, 24, 34, 44, 57, 119
src/testthat-helpers.h         15       5  66.67%   36-37, 41, 50, 53
src/utils.h                    84       0  100.00%
TOTAL                        3178     112  96.48%

Diff against main

Filename           Stmts    Miss  Cover
---------------  -------  ------  -------
R/interop-car.R      +70      +2  +97.14%
R/testing.R           +9       0  +1.02%
R/utils.R            +10      +1  -0.14%
R/zzz.R               +5      +5  -5.05%
TOTAL                +94      +8  -0.15%

Results for commit: af1155e

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Dec 19, 2023

Unit Tests Summary

       1 files       44 suites   23s ⏱️
   467 tests    429 ✔️ 38 💤 0
1 837 runs  1 794 ✔️ 43 💤 0

Results for commit af1155e.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 19, 2023

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
car 👶 $+0.28$ $+17$ $+1$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
car 👶 $+0.20$ Anova_give_similar_results_to_SAS
car 👶 $+0.02$ Anova_works_as_expected
car 👶 $+0.04$ car_emits_a_message_about_mmrm_registration_on_load
car 👶 $+0.02$ h_get_contrast_works_as_expected
testing 👶 $+0.01$ df_md_return_df_0_and_other_stat_all_NA_if_empty_matrix_provided

Results for commit c4d26f2

♻️ This comment has been updated with latest results.

Liming Li (李黎明) added 2 commits December 19, 2023 13:48
Copy link
Collaborator

@danielinteractive danielinteractive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @clarkliming , looks great!
Few suggestions:

  • Could we use a similar mechanism as for emmeans so that we don't need to import car but just suggest it?
  • could we add a NEWS item
  • For the vignette I remember we somewhere have something on hypothesis testing already, would it make sense to integrate those together somehow?
  • please add an example in introduction vignette

Liming Li (李黎明) and others added 2 commits December 20, 2023 12:20
@clarkliming
Copy link
Collaborator Author

clarkliming commented Dec 20, 2023

Thanks @clarkliming , looks great! Few suggestions:

  • Could we use a similar mechanism as for emmeans so that we don't need to import car but just suggest it?

Updated. However added a new function (copy from emmeans) but it is difficult to do any testing on it

  • could we add a NEWS item

Already had an entry under "new features". do we need more?

  • For the vignette I remember we somewhere have something on hypothesis testing already, would it make sense to integrate those together somehow?

Is it the section in introduction? Maybe it is clearer to be separated here because it involves a lot of details?

  • please add an example in introduction vignette

Added now

R/mmrm-methods.R Outdated Show resolved Hide resolved
R/zzz.R Show resolved Hide resolved
Liming Li (李黎明) added 2 commits December 20, 2023 12:25
Copy link
Collaborator

@danielinteractive danielinteractive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @clarkliming ! Great stuff. I gave it a thorough last round of review.

R/interop-car.R Outdated Show resolved Hide resolved
R/interop-car.R Outdated Show resolved Hide resolved
NEWS.md Outdated Show resolved Hide resolved
NEWS.md Outdated Show resolved Hide resolved
R/interop-car.R Outdated Show resolved Hide resolved
vignettes/hypothesis_testing.Rmd Show resolved Hide resolved
vignettes/hypothesis_testing.Rmd Outdated Show resolved Hide resolved
vignettes/hypothesis_testing.Rmd Outdated Show resolved Hide resolved
vignettes/hypothesis_testing.Rmd Show resolved Hide resolved
vignettes/hypothesis_testing.Rmd Outdated Show resolved Hide resolved
clarkliming and others added 3 commits December 21, 2023 07:40
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
clarkliming and others added 23 commits December 21, 2023 07:40
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
@danielinteractive danielinteractive self-assigned this Dec 21, 2023
Copy link
Collaborator

@danielinteractive danielinteractive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats @clarkliming , good to merge after last few suggestions are in!

_pkgdown.yml Outdated Show resolved Hide resolved
@@ -1,3 +1,4 @@
ARMCD
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe set in backticks to avoid the need for this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is in the matrix part so adding backtick is ugly and really not necessary

$$\begin{bmatrix} \mu & ARMCD & RACE & RACE & ARMCD:RACE & ARMCD:RACE\\\ 0 & 0 & 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 1 & 0 & 0\\ \end{bmatrix}$$ $$\begin{bmatrix} \mu & `ARMCD` & `RACE` & `RACE` & `ARMCD`:`RACE` & `ARMCD`:`RACE`\\\ 0 & 0 & 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 1 & 0 & 0\\ \end{bmatrix}$$

vignettes/hypothesis_testing.Rmd Outdated Show resolved Hide resolved
vignettes/hypothesis_testing.Rmd Outdated Show resolved Hide resolved
vignettes/hypothesis_testing.Rmd Outdated Show resolved Hide resolved
vignettes/hypothesis_testing.Rmd Outdated Show resolved Hide resolved
vignettes/hypothesis_testing.Rmd Outdated Show resolved Hide resolved
clarkliming and others added 2 commits December 22, 2023 09:20
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
Co-authored-by: Daniel Sabanes Bove <danielinteractive@users.noreply.github.com>
@danielinteractive danielinteractive merged commit 5f7a881 into main Dec 22, 2023
23 checks passed
@danielinteractive danielinteractive deleted the 67_testing branch December 22, 2023 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Implement type II/III testing
2 participants