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

Fix mistake in corPFSOS bootstrap #95

Merged
merged 3 commits into from
Nov 28, 2023
Merged

Fix mistake in corPFSOS bootstrap #95

merged 3 commits into from
Nov 28, 2023

Conversation

holgstr
Copy link
Contributor

@holgstr holgstr commented Nov 28, 2023

Fixes mistake I found in corPFSOS. We displayed corTrans() of initial TransitionParameters, need corTrans() of estimated object instead.

@holgstr holgstr added the bug Something isn't working label Nov 28, 2023
@holgstr holgstr self-assigned this Nov 28, 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.

Thanks @holgstr , can you please add a test that first reproduces the error / makes sure it works correctly now?

Copy link
Contributor

github-actions bot commented Nov 28, 2023

Unit Tests Summary

    1 files    16 suites   2m 14s ⏱️
  81 tests   80 ✔️ 1 💤 0
185 runs  184 ✔️ 1 💤 0

Results for commit abdf4a0.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Nov 28, 2023

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
corPFSOS 👶 $+1.94$ $+1$ $0$ $0$ $0$
estimateParams 💚 $27.84$ $-1.01$ $0$ $0$ $0$ $0$
getSimulatedDataDistib 💚 $99.96$ $-1.37$ $0$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
corPFSOS 👶 $+1.94$ corPFSOS_returns_correct_central_estimate
getSimulatedDataDistib 💔 $34.54$ $+1.12$ getSimulatedData_generates_distributions_as_expected_PW
getSimulatedDataDistib 💚 $53.39$ $-2.04$ getSimulatedData_generates_distributions_as_expected_Weibull

Results for commit 0c076cb

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Nov 28, 2023

badge

Code Coverage Summary

Filename                     Stmts    Miss  Cover    Missing
-------------------------  -------  ------  -------  ----------------------
R/assertions.R                  15       0  100.00%
R/corPFSOS.R                    91      37  59.34%   34-53, 92-113, 303-321
R/empSignificant.R              59       0  100.00%
R/estimateParams.R              75       4  94.67%   138-141
R/eventTracking.R               88       2  97.73%   48, 244
R/getClinicalTrials.R           71       0  100.00%
R/getSimulatedData.R           109       0  100.00%
R/getWaitTimeSum.R              29       2  93.10%   45, 48
R/hazardFunctions.R             26       0  100.00%
R/piecewiseDistribution.R       32       0  100.00%
R/piecewiseHazards.R            18       0  100.00%
R/survivalFunctions.R          111       0  100.00%
R/transitionParameters.R        42       0  100.00%
TOTAL                          766      45  94.13%

Diff against main

Filename              Stmts    Miss  Cover
------------------  -------  ------  -------
R/corPFSOS.R             -1     -55  +59.34%
R/estimateParams.R        0      -1  +1.33%
TOTAL                    -1     -56  +7.29%

Results for commit: abdf4a0

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

accrual = list(param = "intensity", value = 7)
)[[1]]
actual <- corPFSOS(data, transition = exponential_transition(), bootstrap = FALSE)
expect_equal(actual[[1]], corTrans(transition = transition), tolerance = 1e-2)
Copy link
Collaborator

Choose a reason for hiding this comment

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

but this would not be correct?
What you can do e.g. is to write down the correct result you get now and compare with that here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see what you mean :)

@danielinteractive danielinteractive merged commit c9fb38a into main Nov 28, 2023
24 checks passed
@danielinteractive danielinteractive deleted the corpfsos-fix branch November 28, 2023 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants