-
Notifications
You must be signed in to change notification settings - Fork 2
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
Cgwpgsd #44
Cgwpgsd #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @guangguangzai , please find my comments below, and we can catch up tomorrow.
vignettes/wpgsd_corr_example.Rmd
Outdated
|
||
## Examples | ||
|
||
In a 2-arm controlled clinical trial example with one primary endpoint, there are 3 patient populations defined by the status of two biomarkers A and B: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please cite where this example is from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cite paper, example 1
vignettes/wpgsd_corr_example.Rmd
Outdated
tab_header(title = "Number of events at each population") | ||
``` | ||
|
||
### Example 1 - Same Analyses Different Population |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we call it "Correlation of different populations within the same analysis"?
vignettes/wpgsd_corr_example.Rmd
Outdated
round(Corr1, 2) | ||
``` | ||
|
||
### Example 2 - Same Population Different Analyses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we call it "Correlation of different analyses within the same population"?
vignettes/wpgsd_corr_example.Rmd
Outdated
tab_header(title = "Number of events at each analyses in example 2") | ||
``` | ||
The the corrleation could be simply calculated as | ||
$$Corr(Z_{11},Z_{12})=\frac{100}{\sqrt{100*200}}=0.71$$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explain the 100 at the numerator.
vignettes/wpgsd_corr_example.Rmd
Outdated
Corr1 <- 100 / sqrt(100 * 200) | ||
round(Corr1, 2) | ||
``` | ||
### Example 3 - Cross Population Cross Analyses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we call it "Correlation of different analyses and different population"?
vignettes/wpgsd_corr_example.Rmd
Outdated
``` | ||
Now we know how to calculate the correlation values under different situations, and the generate_corr function was built based on this logic. We can directly calculate the results for each cross situation via the function. | ||
|
||
First, we need a event table including the information of the cohort. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The word "cohort" is confusing...
vignettes/wpgsd_corr_example.Rmd
Outdated
gt() %>% | ||
tab_header(title = "Number of events at each population & analyses") | ||
``` | ||
"H1" indicates that the experimental treatment is superior to the control in population 1/experimental arm 1. "H2" indicates that the experimental treatment is superior to the control in population 2/experimental arm 2. "Analysis" refers to different stages of analysis, such as 1 for interim analysis and 2 for final analysis. "Event" represents the number of events in this condition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraph looks not correct to me... H1 is 1 hypothesis, H2 is the other hypothesis. Event is the common events overlap by H1 and H2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
H1 could be the anyone from the hypotheses, listed in the multiplicity/to be tested, depending on the one interested.
vignettes/wpgsd_corr_example.Rmd
Outdated
``` | ||
"H1" indicates that the experimental treatment is superior to the control in population 1/experimental arm 1. "H2" indicates that the experimental treatment is superior to the control in population 2/experimental arm 2. "Analysis" refers to different stages of analysis, such as 1 for interim analysis and 2 for final analysis. "Event" represents the number of events in this condition. | ||
|
||
For example: H1=1, H2=1, Analysis=1, Event=100 indicates that in the first population, there are 100 cases where the experimental treatment is superior to the control in the interim analysis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Echo with my previous comment. We ought to say what is H1=1 means, and then H2 = 1 means first. Then explain what Event is under H1=1 and H2=1.
vignettes/wpgsd_corr_example.Rmd
Outdated
|
||
For example: H1=1, H2=1, Analysis=1, Event=100 indicates that in the first population, there are 100 cases where the experimental treatment is superior to the control in the interim analysis. | ||
|
||
Another example: H1=1, H2=2, Analysis=2, Event=160 indicates that the number of overlapping cases where the experimental treatment is superior to the control in population 1 and 2 in the final analysis is 160. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Echo with my previous comment.
vignettes/wpgsd_corr_example.Rmd
Outdated
*To be noticed, the column names in this function are fixed to be 'H1, H2, Analysis, Event'. | ||
After we have the event table, we can use generate_corr function to calculate correlation. | ||
|
||
```{r} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we will no longer need the things after line 150, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @guangguangzai! Thanks for the revision. The vignette looks great and I only have few editorial comments below.
vignettes/wpgsd_corr_example.Rmd
Outdated
@@ -47,7 +51,7 @@ event_tb %>% | |||
tab_header(title = "Number of events at each population") | |||
``` | |||
|
|||
### Example 1 - Same Analyses Different Population | |||
### Example 1 - Correlation of different populations within the same analysis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we delete "Example 1"?
vignettes/wpgsd_corr_example.Rmd
Outdated
@@ -18,7 +19,7 @@ $$Corr(Z_{ik},Z_{i'k'})=\frac{n_{i \wedge i',k \wedge k'}}{\sqrt{n_{ik}*n_{i'k'} | |||
|
|||
## Examples | |||
|
|||
In a 2-arm controlled clinical trial example with one primary endpoint, there are 3 patient populations defined by the status of two biomarkers A and B: | |||
In a 2-arm controlled clinical trial example with one primary endpoint (@anderson_unified_2022), there are 3 patient populations defined by the status of two biomarkers A and B : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be more specific where the example is from, say, which section, which example. Some explanations like, "this example is borrowed from xxx paper" is helpful.
vignettes/wpgsd_corr_example.Rmd
Outdated
``` | ||
|
||
### Example 2 - Same Population Different Analyses | ||
Let's consider another simple situation, we want to compare single population, for example population 1, but in different analyses, interim and final analyses. Then $i=1$, and to compare IA and FA, the $k$ will be $k=1$ and $k=2$. | ||
### Example 2 - Correlation of different analyses within the same population |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we delete "Example 2"?
vignettes/wpgsd_corr_example.Rmd
Outdated
``` | ||
### Example 3 - Cross Population Cross Analyses | ||
### Example 3 - Correlation of different analyses and different population |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we delete "Example 3"?
vignettes/wpgsd_corr_example.Rmd
Outdated
@@ -66,197 +70,90 @@ event_tbl %>% | |||
The the corrleation could be simply calculated as | |||
$$Corr(Z_{11},Z_{21})=\frac{80}{\sqrt{100*110}}=0.76$$ | |||
```{r} | |||
Corr1 <- 80 / sqrt(100 * 110) | |||
round(Corr1, 2) | |||
Corr1=80/sqrt(100*110) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use <-
instead of =
, for consistency with the entire package. Please check the entire Rmd file for the usage of =
.
vignettes/wpgsd_corr_example.Rmd
Outdated
Now we know how to calculate the correlation values under different situations, and the generate_corr function was built based on this logic. We can directly calculate the results for each cross situation via the function. | ||
|
||
First, we need a event table including the information of the cohort. | ||
Now we know how to calculate the correlation values under different situations, and the generate_corr() function was built based on this logic. We can directly calculate the results for each cross situation via the function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you cite a R function name please use single quotation, i.e., use "generate_corr
" install of "generate_corr". Please check the entire of the Rmd file.
The file is for wpgsd correlation calculation