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

add in robincar vcov, its report and the tests #16

Merged
merged 15 commits into from
Jun 26, 2024

Conversation

hoppanda
Copy link
Collaborator

@hoppanda hoppanda commented May 6, 2024

No description provided.

@hoppanda hoppanda linked an issue May 6, 2024 that may be closed by this pull request
6 tasks
Copy link
Contributor

github-actions bot commented May 6, 2024

badge

Code Coverage Summary

Filename                     Stmts    Miss  Cover    Missing
-------------------------  -------  ------  -------  ----------------------
R/bias.R                        11       0  100.00%
R/predict_couterfactual.R       46       0  100.00%
R/prediction_cf.R                3       0  100.00%
R/report_vcovRobinCar.R         53      14  73.58%   59-70, 79-80
R/utils.R                       21       4  80.95%   16, 34-36
R/variance_anhecova.R           49      49  0.00%    11-74
R/variance.R                   111      19  82.88%   5-13, 179-181, 193-200
TOTAL                          294      86  70.75%

Diff against main

Filename                   Stmts    Miss  Cover
-----------------------  -------  ------  --------
R/report_vcovRobinCar.R      +53     +14  +73.58%
R/variance_anhecova.R        +49     +49  +100.00%
R/variance.R                +102     +10  +82.88%
TOTAL                       +204     +73  -14.81%

Results for commit: a4f6519

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented May 7, 2024

Unit Tests Summary

 1 files   5 suites   0s ⏱️
13 tests  2 ✅ 11 💤 0 ❌
23 runs  12 ✅ 11 💤 0 ❌

Results for commit a4f6519.

♻️ This comment has been updated with latest results.

@clarkliming
Copy link
Collaborator

clarkliming commented May 7, 2024

I have checked and found that the results are identical, after fixing the issue spotted in #17

in the design there are extra control to 1. ensure unbiasness in prediction (causing 1e-15 difference) 2. use decompose method to obtain the variance instead of calculate the variance of residuals (causing 1e-7 difference)

@clarkliming
Copy link
Collaborator

the code in all_draft_functions.R and the documentation can be a good source of qc/vignettes, however probably we can have better strucutres, e.g. add another folder instead of duplicating the current design.rmd files

hoppanda and others added 4 commits May 19, 2024 13:38
* update data and fix design (#17)

* update data and fix design

* update treatment to factor

* fix styler and lint

* 7 counter factual prediction (#14)

* add function prototype

* add basic tests on functionality

* add readme

* add lm support

* update tests

* update prediction

* simplify

* fix typo

* fix check issues

* update vignettes skeleton

* use dummy data in test

* update print of cf predictions

* fix checks

* fix check issues

* update bias args

* [skip style] [skip vbump] Restyle files

* add treatment to counter factual prediction

* fix check

* 18 sandwich variance (#19)

* add vcov

* fix check issues

* correct issue

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* 20 add another developers design note (#22)

* add in all draft functions

* [skip style] [skip vbump] Restyle files

* clean up design folder for merging

* [skip style] [skip vbump] Restyle files

* Update .gitignore

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Liming <[email protected]>

---------

Co-authored-by: Liming <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
@hoppanda hoppanda closed this May 19, 2024
@hoppanda hoppanda reopened this May 19, 2024
@hoppanda hoppanda changed the title add in all draft functions add in robincar vcov, its report and the tests May 19, 2024
Copy link
Contributor

github-actions bot commented May 19, 2024

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
report 👶 $+0.24$ $+4$ $+4$ $0$ $0$
variance 👶 $+0.11$ $+3$ $+3$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
report 👶 $+0.09$ reporting_function_give_info_message_when_eff_measure_is_NULL
report 👶 $+0.05$ reporting_function_works_for_binomial_fitted_by_glm
report 👶 $+0.05$ reporting_function_works_for_gaussian_fitted_by_lm
report 👶 $+0.05$ reporting_function_works_for_guassian_fitted_by_glm
variance 👶 $+0.04$ robincar_convariance_estimation_works_for_binomial_fitted_by_glm
variance 👶 $+0.04$ robincar_convariance_estimation_works_for_guassian_fitted_by_glm
variance 👶 $+0.03$ robincar_convariance_estimation_works_for_guassian_fitted_by_lm

Results for commit 7a0c5a7

♻️ This comment has been updated with latest results.

@hoppanda hoppanda requested a review from clarkliming May 19, 2024 22:30
R/variance.R Outdated Show resolved Hide resolved
* add anhecova covariance

* fix error
* replace original function with faster version

* update anhecova variance and remove report functions
@clarkliming clarkliming merged commit 569d6ff into main Jun 26, 2024
10 of 19 checks passed
@clarkliming clarkliming deleted the 9-implement-anhecova-robust-variance branch June 26, 2024 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implement anhecova robust variance and its report
2 participants