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

236 milestone take the un squared version of the current z statistics #237

Conversation

LittleBeannie
Copy link
Collaborator

@LittleBeannie LittleBeannie commented Apr 24, 2024

Closes #236

@LittleBeannie LittleBeannie marked this pull request as draft April 24, 2024 17:05
@LittleBeannie LittleBeannie marked this pull request as ready for review April 25, 2024 20:51
@LittleBeannie LittleBeannie self-assigned this Apr 25, 2024
@LittleBeannie LittleBeannie added the development New feature or request label Apr 25, 2024
Copy link
Collaborator

@nanxstats nanxstats left a comment

Choose a reason for hiding this comment

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

I see the "multitest" unit test is skipped for now - would be great to unskip it later after the hypothesis testing syntax is updated.

@nanxstats nanxstats merged commit e4b9384 into main May 1, 2024
7 checks passed
@nanxstats nanxstats deleted the 236-milestone-take-the-un-squared-version-of-the-current-z-statistics branch May 1, 2024 17:48
@jdblischak
Copy link
Collaborator

I see the "multitest" unit test is skipped for now - would be great to unskip it later after the hypothesis testing syntax is updated.

I don't understand why this test was skipped. It doesn't run the updated milestone() function, so it should have been unaffected by this PR. I just ran it locally, and it passed

@nanxstats
Copy link
Collaborator

I don't understand why this test was skipped. It doesn't run the updated milestone() function, so it should have been unaffected by this PR. I just ran it locally, and it passed

🤔 That would be a good question for @LittleBeannie

Copy link
Collaborator

@jdblischak jdblischak left a comment

Choose a reason for hiding this comment

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

Overall this PR had a much bigger impact than I had anticipated. I assumed it was only changing the Z statistics in z. However, it also changed se to only return a single value instead of two. And the default estimate is also changed by the new test_type of "log-log". I was able to fix estimate for my sim_gs_n() tests by adding test_type = "naive".

We should add some developer tests for milestone() so that it is more transparent how a PR is effecting the output.

#'
#' @param test_type Method to build the test statistics.
#' There are 2 options:
#' - `"native"`: a native approach by dividing the KM survival difference by its standard derivations,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the approach "native" or "naive"? The string passed to test_type below is "naive"

Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably a typo - should be "naive" cc @LittleBeannie

#' - `method` - The method, always `"milestone"`.
#' - `parameter` - Milestone time point.
#' - `estimation` - Survival difference between the experimental and control arm.
#' - `se` - Standard error of the control and experimental arm.
Copy link
Collaborator

@jdblischak jdblischak May 6, 2024

Choose a reason for hiding this comment

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

The se result was changed by this PR, but the documentation did not change. Previously it returned two standard error values (from fit_res$std.err), but now it only returns a single standard error. Is it the standard error of the control arm, experimental arm, or some combination? We should update the documentation for this return value

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed, this should be a quick fix for @LittleBeannie

jdblischak added a commit to jdblischak/simtrial that referenced this pull request May 6, 2024
milestone() was recently overhauled to

1. Use the log-log method to calculate the `estimate`. Setting
   `test_type = "naive"` restored the previous value
1. Return a single value for `se` instead of two
1. Return the unsquared Z statistic for `z`

Merck#237
jdblischak added a commit to jdblischak/simtrial that referenced this pull request May 7, 2024
milestone() was recently overhauled to

1. Use the log-log method to calculate the `estimate`. Setting
   `test_type = "naive"` restored the previous value
1. Return a single value for `se` instead of two
1. Return the unsquared Z statistic for `z`

Merck#237
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

milestone(): take the un-squared version of the current Z statistics
3 participants