yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2008-09-17 15:33 (6067 d 10:09 ago) (edited on 2008-09-17 19:32) Posting: # 2372 Views: 23,142 |
|
Dear all, It's been a while since we released bear v1.0.0 at this forum on last July. Then we have received lots of comments from bear's users, also including very nice experts at this forum. Though I tried to update some change log of bear since v1.0.0, I had problem to log in this forum from time to time. Then we went to Dortmund, Germany, for the R Annual Meeting (userR!2008) during August 9 to 18. A very nice meeting there. The following are the change log and Todo lists since v1.0.0. Change Log (Sept. 17, 2008) ----- v1.1.4
Todo Lists (Sept. 17, 2008) -----
— All the best, -- Yung-jin Lee bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan https://www.pkpd168.com/bear Download link (updated) -> here |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2008-09-17 18:59 (6067 d 06:44 ago) @ yjlee168 Posting: # 2374 Views: 20,602 |
|
Dear Yung-jin, thanks again for sharing your package with the R community! A suggestion for the next version: in the sample size demo I would suggest an expected ratio of 95% rather than 105% due to the asymetry of the power curves (in actual calculations it's always better to use an expected difference of -5% rather than +5% in order to obtain a conservative sample size for +5%). — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2008-09-17 23:03 (6067 d 02:39 ago) (edited on 2008-09-18 06:07) @ Helmut Posting: # 2375 Views: 20,409 |
|
Dear Helmut, Thank you for your suggestion. I recalled that the reason we used 105% in the demo of sample size estimation was based on Dr. David Dubins' FARTSSIE (.xls) (plz see the attached picture that I did screenshot from it). We will do as you suggest in the next version. ❝ A suggestion for the next version: in the sample size demo I would suggest ❝ an expected ratio of 95% rather than 105% due to the asymetry of the power ❝ curves (in actual calculations it's always better to use an expected ❝ difference of -5% rather than +5% in order to obtain a ❝ conservative sample size for +5%). ![]() — All the best, -- Yung-jin Lee bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan https://www.pkpd168.com/bear Download link (updated) -> here |
martin ★★ Austria, 2008-09-19 15:13 (6065 d 10:29 ago) @ yjlee168 Posting: # 2377 Views: 20,326 |
|
dear Yung-jin Lee ! thank you very much for your acknowledgment regarding estimation of lambda_z ! you may think on using the function lee in the R package PK for estimation of lambda_z. you may adopt the lee approach to estimate lambda_z for extravascual administered drugs. I think by calling the function lee with a subset of the data (e.g. the period from Tmax to Tlast) should provide estimates for lambda_z. what do you think? best regards martin PS.: note that we used log10 - transformed values for estimation of intitial and terminal half-life after IV bolus administration. we used the log10 transformation in accordance to the orginal paper of Lee et. al (1990). in the case that you are interested in estimation of lambda_z for estimation of AUC from 0 to infinity (extrapolated area) you have to use the ln transformation otherwise your AUC from 0 to infinity is biased. |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2008-09-22 20:19 (6062 d 05:23 ago) @ martin Posting: # 2383 Views: 20,246 |
|
Dear martin, Thank you and we will see if we can implement "lee" function into bear to calculate lambda_z. However, it seems very positive. And I will remember the difference of "log10" and "ln". Thanks again. — All the best, -- Yung-jin Lee bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan https://www.pkpd168.com/bear Download link (updated) -> here |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2008-09-23 02:46 (6061 d 22:56 ago) @ martin Posting: # 2385 Views: 20,266 |
|
Dear Martin! ❝ [...] I think by calling the function lee with a subset of the data (e.g. ❝ the period from Tmax to Tlast) should provide estimates for lambda_z. ❝ ❝ what do you think? I don't think that Tmax is the right starting point - not even for a 1-compartment model (see this post and this thread as well). — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
martin ★★ Austria, 2008-09-27 11:37 (6057 d 14:05 ago) (edited on 2008-09-27 13:28) @ Helmut Posting: # 2426 Views: 20,126 |
|
dear HS ! on the assumption of a one-compartmental open model (i.e. one compartmental absorption and one-compartmental elimination) I think that the lee method should be able to distinguish between the "mixture phase" (i.e. absorption and elimination) after Tmax and the pure elimination phase. You are right that Tmax is not a good starting point in the case of higher order models after extravascular administration. I have to admit that I never performed simulations for the lee method in combination with extra-vascular compartmental models (I studied models after intravenous bolus administration). however, this discussion motivated me to set-up a few simulation scenarios and check the behaviour of the lee method to estimate the terminal elimination rate in such cases. best regards martin PS.: I would very be happy if you could provide me some real life examples of one-compartmental open models (just parameter estimates no source data) to simulate log-normally distributed concentrations based on these models and check the performance of the lee method to select the elimination phase. |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2008-09-27 16:05 (6057 d 09:37 ago) @ martin Posting: # 2427 Views: 20,153 |
|
Dear Martin! Answering to your P.S. only (I'm leaving for a couple of conferences tomorrow): I would be glad sharing data-sets (actually I'm 'having' hundreds of them). I will give you a call you after the 9th of October. — Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2008-09-23 12:07 (6061 d 13:35 ago) @ martin Posting: # 2386 Views: 20,294 |
|
Dear martin, The lee function from package PK (for R) seems not working correctly. We tried several examples here and found the result weird. The code we used to test and the result we obtained is shown as follow (one of tested examples). > ##1 example for preparation 1 from Lee et al. (1990) And its plot of the regression line is like this: ![]() Interesting to find that lee function seems to take all data points to estimate lambdaz with the subset data. Looked like that lee function cannot pick up appropriate data points to estimate lambdaz (or half-lives). Apparently, lee function doesn't meet our needs. — All the best, -- Yung-jin Lee bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan https://www.pkpd168.com/bear Download link (updated) -> here |
martin ★★ Austria, 2008-09-27 11:25 (6057 d 14:18 ago) (edited on 2008-09-27 17:57) @ yjlee168 Posting: # 2425 Views: 20,177 |
|
dear Yung-jin Lee ! thank you for considering the function lee. this method was originally developed for IV bolus administration models. please note that the lee method is able to distinguish between a distributive and an elimination phase (after IV bolus administration) based on an optimisation criteria when there are in fact two transport processes. for the example of Lee et al (1990) and using the ols criteria the best fit to the data is simply a straight line indicating that the transport process over time can be characterized by an elimination process only. when there is a distributive and an elimination process the lee method is able to select phases appropriately. for testing the function I suggest to use also data that have a distributive and an elimination process which is not the case for the example provided. I suppose that your tested data cover only one-compartmental models. in such cases the lee method returns, of course, only a monophasic decline. using this dataset for an IV bolus administration (R package stats) illustrates the lee method in more detail:
Indo.1 <- Indometh[Indometh$Subject==1,]
print(Indo.1) this results indicate that the decline over time can be described by a distributive and an elimation phase where the "best" time points used to calculate lambda_z are time points greater 1.754 hours to the last sampling time point. for technical details you may find this paper of interest: Wolfsegger M. J. (2006). The R Package PK for Basic Pharmacokinetics. Biometrie und Medizin, 5:61-68. summarizing, the lee method works correctly - you just have to interpret the results carefully. best regards martin PS.: I found a dataset for an one-compartmental open model (R package stats). please find below my idea to select appropriate time points for calculation of lambda_z when a drug is given by an extravascular route of administration:
> data <- Theoph[Theoph$Subject==5,]
> print(data) this results indicate that the "best" time points used to calculate lambda_z are time points greater 4.518 hours to the last sampling time point. note that you have to specify the option lt=FALSE as after Tmax there is an absorption and elimination process after extravascular administration. you get the corresponding plot with plot(res,log='y') . you have also the choice to use more robust methods of estimation by using the option method . |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2008-09-29 14:03 (6055 d 11:39 ago) @ martin Posting: # 2430 Views: 20,148 |
|
Dear martin, We cannot access the article (not in the PubMed) as you pointed below from Taiwan. Is the article in English? If not, what the language was it published? Thanks. ❝ Wolfsegger M. J. (2006). The R Package PK for Basic Pharmacokinetics. Biometrie und Medizin, 5:61-68. — All the best, -- Yung-jin Lee bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan https://www.pkpd168.com/bear Download link (updated) -> here |
Helmut ★★★ ![]() ![]() Vienna, Austria, 2008-09-29 14:10 (6055 d 11:32 ago) @ yjlee168 Posting: # 2431 Views: 20,301 |
|
— Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![]() Helmut Schütz ![]() The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2008-09-29 15:07 (6055 d 10:35 ago) @ Helmut Posting: # 2435 Views: 20,048 |
|
Dear Helmut, Thank you so much. I just cannot find it from PubMed. — All the best, -- Yung-jin Lee bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan https://www.pkpd168.com/bear Download link (updated) -> here |
martin ★★ Austria, 2008-10-11 17:30 (6043 d 08:13 ago) @ yjlee168 Posting: # 2514 Views: 20,255 |
|
dear yjlee168 ! please find enclosed the wonderful code from Aceto81 ![]() best regards martin
f <- function(dat, lee.method='ols', lee.cmax=FALSE){ |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2008-10-11 21:45 (6043 d 03:57 ago) @ martin Posting: # 2517 Views: 20,149 |
|
Dear martin, Thank you for your codes. Yes, we're working very hard on these (lambdaz estimation) right now. We consider to release the first 3 methods: manual selection of the exact 3 points, ARS, and TTT in the next release. However, there are also TTT-ARS and TTT-AICs under development and coding. All these methods are to exclude the data point of Cmax. Recently, we also re-structure our codes to make it more integrable in the future. We will try your codes/methods asap and will try to implement it. The final results for all these methods will be posted in this Forum. We really learn a lots from this Forum. — All the best, -- Yung-jin Lee bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan https://www.pkpd168.com/bear Download link (updated) -> here |
martin ★★ Austria, 2008-10-12 02:04 (6042 d 23:38 ago) @ yjlee168 Posting: # 2519 Views: 20,108 |
|
dear Yung-jin Lee ! good to hear that your code will be much more sophisticated than WinNonLin! I appreciate your efforts. you may find of interest that in the case of manual selection of the last 3 time points, the middle time point is “useless” to calculate lambda_z by using the OLS fitting criteria in the case of equidistant measurement time points. in this case, the middle data tuple only effects the intercept but not the slope (=lambda_z). you may think about implementing a warning message in this case. the theoretical background for this unexpected behavior rather complicated but I can provide you some information upon request. some examples:
t <- c(10, 12, 14) # equidistant time points |
yjlee168 ★★★ ![]() ![]() Kaohsiung, Taiwan, 2008-10-16 13:20 (6038 d 12:23 ago) @ martin Posting: # 2541 Views: 19,903 |
|
dear martin, Do you think that we need to take the absolute value for AIC (extractAIC) here? ![]() Thanks. ❝ — All the best, -- Yung-jin Lee bear v2.9.2:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan https://www.pkpd168.com/bear Download link (updated) -> here |
Aceto81 ★ Belgium, 2008-10-16 14:09 (6038 d 11:33 ago) @ yjlee168 Posting: # 2542 Views: 19,808 |
|
❝ Do you think that we need to take the absolute value for AIC (extractAIC) here? ❝ Maybe a bit of clarification for the abs() value: I took the example from a thread, mentioned before, and get the same AIC values, except that they were negative. So that's the reason why I used the abs() value. Ace |
martin ★★ Austria, 2008-10-16 14:29 (6038 d 11:13 ago) @ Aceto81 Posting: # 2543 Views: 19,835 |
|
dear ace and yung-jin lee ! I suggest not to use the absolute value. please find below a new modification of the ace's code including some lines to prevent errors which I encountered in a simulation study (for strange PK profiles) best regards
# function for selection of time points |
Aceto81 ★ Belgium, 2008-10-16 16:11 (6038 d 09:31 ago) @ martin Posting: # 2545 Views: 19,885 |
|
Martin, nice to see that the code is adapted untill everyone is happy ![]() Correct me if I'm wrong, but you still use the abs function for the AIC values? What's the reason you get those NA values for the adjusted R2 value? Could you provide me an example? Ace |
martin ★★ Austria, 2008-10-16 17:03 (6038 d 08:39 ago) (edited on 2008-10-16 20:20) @ Aceto81 Posting: # 2546 Views: 19,781 |
|
dear ace ! UUPS! you are right - thank you for pointing this out; code line 3 has to be adjusted accordingly. I encountered this NA behavior in simulations studying very strange PK profiles; I have to fish for an example. I will keep you informed. best regards martin |
martin ★★ Austria, 2008-10-16 22:02 (6038 d 03:40 ago) @ Aceto81 Posting: # 2547 Views: 19,925 |
|
dear ace ! here is a rather strange (artificial) example generated in a simulation study (R version 2.6.2 for windows XP) best regards martin
time <- c(0.08263463, 0.52824754, 1.17358567, 1.39767757, 2.47663194, 3.19031555, 3.97925368, 6.95466074, 7.42732263, 12.08734425, 12.35692940, 13.63305248, 21.64587886, 29.33632297) |
Aceto81 ★ Belgium, 2008-10-17 14:30 (6037 d 11:12 ago) @ martin Posting: # 2548 Views: 20,235 |
|
Dear Martin, Thanks for the example! The reason for the NA is the fact that the program was only selecting 2 samples, instead of the minimum of 3. This was caused by the fact that there were 2 samples after 2x Tmax. So infact this should return an NA for the method I think (correct me if I'm wrong). Here is an implementation:
time <- c(0.08263463, 0.52824754, 1.17358567, 1.39767757, 2.47663194, 3.19031555, 3.97925368, 6.95466074, 7.42732263, 12.08734425, 12.35692940, 13.63305248, 21.64587886, 29.33632297) Ace |