Genentech / psborrow

An R package for Bayesian Dynamic Borrowing. Check out the successor psborrow2: https://github.com/Genentech/psborrow2
Other
0 stars 3 forks source link

How to calculate `etaC`? #57

Closed zhiiiyang closed 1 year ago

zhiiiyang commented 2 years ago

Hi, thank you for making this package. I have a question regarding inputting the correct etaC value. In your guide, you wrote the following

image It was not clear to me how the numbers in the text are used to generate numbers in the function (see highlighted). Thank you!

zhiiiyang commented 1 year ago

@gowerc @yichenlu47 @mattsecrest

gowerc commented 1 year ago

Hi @zhiiiyang ,

Apologies for the delay in replying.

I think this is just a straight forward typo. My guess is that at some point the code was updated as the stated values of 1 and 1.2 were too high and causing too many subjects to dropout but the text wasn't updated accordingly. (@mattsecrest if you agree I will go ahead and adjust the vignette text).

Looking at the code and playing with some examples the etaC parameter is essentially the inverse of the mean to a exponential distribution. i.e. setting etaC = 5 means all patients have a dropout time drawn from a rexp(5) distribution (mean of 0.2). More specifically though it is a piecewise exponential with d_itv acting as the breakpoints i.e. etaC = c(2, 6), d_itv = c(4) would simulate from a piecewise exponential with lambda = 2 until 4 months and then lambda = 6 afterwards.

More generally I think that text is a bit misleading as there is nothing "per month" about the drop out rate. I will try to update & clarify it.

Hope this helps clarify whats going on.

zhiiiyang commented 1 year ago

@gowerc , thank you for the reply. I understand what you suggested. Looking forward to the update.