MSKCC-Epi-Bio / bstfun

Miscellaneous collection of functions
http://mskcc-epi-bio.github.io/bstfun
Other
34 stars 23 forks source link

added new function to calculate adjusted differences for binary variables #72

Closed ddsjoberg closed 2 years ago

ddsjoberg commented 2 years ago

closes #20

ddsjoberg commented 2 years ago

Review comments from Assel

  1. It would be useful if we could display the corresponding p-value from the adjusted model for the logistic regression analysis, it appears to do this automatically for the ANCOVA.
  2. With both types of outcomes I get a strange location of the footers next to the CI column only, shouldn’t this be next to the adjusted difference?

image

  1. I specify logistic_reg_adj_diff when running the test command but I do not see this referenced in the help file. Will this function be a test call and incorporated into the help file?
  2. Is there a way to specify a different bootstrap n?
  3. Maybe in the description of the help file it would be useful to specify that the second column is subtracted from the first. Sometimes this is not always obvious based on unadjusted rates. You might also clarify that these estimates are generated for the average patient (ie mean/mode values for all covariates).
  4. The footer “Logistic regression adjusted bootstrapped difference” is a bit misleading I think, the CI is bootstrapped but the difference isn’t.
  5. IMO the CI footer is a bit annoying, could you just rename the column “95% Confidence Interval”?
  6. Like the error that add_difference() cant be run after add_p() to avoid confusion!
ddsjoberg commented 2 years ago
  1. It would be useful if we could display the corresponding p-value from the adjusted model for the logistic regression analysis, it appears to do this automatically for the ANCOVA.

Good idea, added!

  1. With both types of outcomes I get a strange location of the footers next to the CI column only, shouldn’t this be next to the adjusted difference?

I am not sure what you mean here. Can you give more detail?

  1. I specify logistic_reg_adj_diff when running the test command but I do not see this referenced in the help file. Will this function be a test call and incorporated into the help file?

What test command are you referring to? add_p()? you can use this fn with add_p() as well. I added a note to the help file.

  1. Is there a way to specify a different bootstrap n?

Yes, there is an example of this in the help file. If it's not clear, please suggest an alternative.

  1. Maybe in the description of the help file it would be useful to specify that the second column is subtracted from the first. Sometimes this is not always obvious based on unadjusted rates. You might also clarify that these estimates are generated for the average patient (ie mean/mode values for all covariates).

All the results in add_difference() are the first column minus the second column.

I added this to the help file: "Adjustment covariates are set to the mean to estimate the adjusted difference"

  1. The footer “Logistic regression adjusted bootstrapped difference” is a bit misleading I think, the CI is bootstrapped but the difference isn’t.

I updated the footnote to be more clear (but I don't like the wording). But this can always be updated by the users. Any suggestion for better text? "Logistic regression adjusted difference, CI estimated with bootstrap"

  1. IMO the CI footer is a bit annoying, could you just rename the column “95% Confidence Interval”?

This is handled in add_difference() for all methods, and can't be controlled in this function.