Helmut
★★★
avatar
Homepage
Vienna, Austria,
2010-12-08 16:48
(5254 d 19:03 ago)

Posting: # 6273
Views: 15,138
 

 Bear: feature requests [🇷 for BE/BA]

Dear bears!

Some suggestions for your To-Do list. ;-)
  • NCAplots.pdf
    • In the subjects' log-plots an overlay of the fitted lambdaz lines (IMHO good practice and mandatory in Canada).
    • Split the mean plot: one showing the means (without SD) and mean plots of formulations with SD. Especially if the study was 'well designed' (enough data points in the area of Cmax the mean plot right now is quite crowded with all the whiskers.
  • NCA_PK.txt
    • I would add a section containing the means/SD for each formulation (by time point) - now it's not possible to cross-check with the plots.
    • Think about geometric means/SD; some (European) regulators prefer a plot of geometric rather arithmetic means.
      Hint: SDgeom=exp(sqrt(1/(n-1) × Sum((ln(x)-ln(xgeom))²)) - hope, I got all the parentheses right.

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2010-12-08 19:49
(5254 d 16:03 ago)

@ Helmut
Posting: # 6274
Views: 13,668
 

 Bear: feature requests

Dear Helmut,

Thank you for your suggestions. I think all your suggestions should be able to be implemented easily. The first one about NCAplots has been mentioned in previous message suggested by sarawuto here.

❝ Some suggestions for your To-Do list. ;-)

  • Think about geometric means/SD; some (European) regulators prefer a

    ❝ plot of geometric rather arithmetic means.

    ❝ Hint: SDgeom=exp(sqrt(1/(n-1) × Sum((ln(x)-ln(xgeom))²)) - hope, I

    ❝ got all the parentheses right.


So, not only in NCA_PK.txt to list geometric means/SD, we also need to add geometric means/SD (by time point) plot for each formulation into NCAplots.pdf.

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
★★★
avatar
Homepage
Vienna, Austria,
2010-12-08 20:48
(5254 d 15:03 ago)

@ yjlee168
Posting: # 6275
Views: 13,609
 

 Bear: feature requests

Dear bears!

❝ The first one about NCAplots has been mentioned in previous message suggested by sarawuto here.


Oh, I forgot that one...

❝ So, not only in NCA_PK.txt to list geometric means/SD, we also need to add geometric means/SD (by time point) plot for each formulation into NCAplots.pdf.


Would be nice!

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
d_labes
★★★

Berlin, Germany,
2010-12-09 09:48
(5254 d 02:03 ago)

@ yjlee168
Posting: # 6280
Views: 13,577
 

 Bear: feature requests

Dear Yung-jin,

I have some another ones, but more bullet proofs rather than new features:

In the NCA module in choosing one of the automatically methods the user is left with errors not so easy to figure out where they came from in the following instances:
  • TTT rule and their combinations if one (or more) curve(s) have no points or n<2 after 2*tmax.
  • AIC / adjR2 as fit criterion if only n<2 points are left.
IMHO it would be wise and more smart to test these cases and throw a warning in user understandable words for those cases and continue(!) with the evaluation of the remaining concentration time curves.
Eventually it would be best to have some fall-back if a method can't applied. F.i. use the points after Cmax if TTT does not yield at least 3 points, use eventually even Cmax, tmax if otherwise n<2 or some similar. Of course with a warning to the user.

Moreover: In the manual selection of time points I have observed:
  • Sometimes the very last point could not be selected. But unfortunately I can't reproduce it because I have forgotten which dataset (seem's Alzheimer is knocking on door :crying:). If I remember I will send you the data.
  • It would be wise for the naive user not to allow choosing points before tmax.

BTW: If you have very much spare time :-D I would highly recommend to refactor the bear code. It's a nightmare to make a code inspection and it must be a nightmare for you to maintain it, I suppose. I know it's naturally grown during development, but ...

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2010-12-09 15:20
(5253 d 20:32 ago)

@ d_labes
Posting: # 6283
Views: 13,657
 

 Bear: feature requests

Dear D. Labes & Yung-jin!

❝ In the manual selection of time points I have observed:

❝ Sometimes the very last point could not be selected.


Confirmed. First I thought this might happen when the last datapoint is very low (close to the x-axis), but this is not the case. Sometimes I couldn't select a datapoint at ≈50% of the y-axis; I don't see a clear pattern. Dataset upon request.

BTW: Why 2-4 points - not more?


Edit: Well, the datapoints were selected, but the label was printed outside the viewport. Better if I moved the graphics window to my second screen in full resolution (1280×1024), but even on my first screen, full res (1600×1200) sometimes the labels were only partly visible. After getting the list of timepoints (hurrah - all are there), and saving the results, I got:
Error in pooledSD(object) :
  No degrees of freedom for estimating std. dev.

... and end of story. :confused:

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2010-12-09 21:24
(5253 d 14:28 ago)

@ Helmut
Posting: # 6285
Views: 13,540
 

 Bear: feature requests

Dear Helmut,

❝ Confirmed. First I thought this might happen when the last datapoint is very low (close to the x-axis), but this is not the case. Sometimes I couldn't select a datapoint at ~50% of the y-axis; I don't see a clear pattern. Dataset upon request.


I will try to zoom out the plot next time by setting the lower limit of y-xis (conc.) to, for instance, minus (Cmax/10) (a negative value; 10 is just an arbitrary number here). Hopefully, the conc. near zero will display better. As the below message that I replied to D. Labes, you can try the trick. ;-)

❝ BTW: Why 2-4 points - not more?


In previous version, it was set to the exact 3 data points. I changed that to 2-4 data points. I remember that it's at least 3 data points based on FDA Guideline. Let me know if I am wrong. What is the max. number of data points required in manual selection?

❝ [cut here]


❝ results, I got:

Error in pooledSD(object) :

  No degrees of freedom for estimating std. dev.


Were these data points very close to zero? I don't have such a situation before. Do you think the zoom-out approach as I mentioned above will be able to solve the problem?

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
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2010-12-09 20:57
(5253 d 14:54 ago)

@ d_labes
Posting: # 6284
Views: 14,914
 

 Bear: feature requests

Dear D. Labes,

Fantastic suggestions. I did have the same situation (it just crashed there!) when using automatic selection algorithms (TTT/AIC/ARS with combinations). The only way to get the job done is the manual selection. Your suggestion sounds feasible. It only needs to write several screening functions for each automatic selection algorithm to scan/check the all data points by subject first, and report if the selected method is applicable for the data set. Even we can show list of subjects who cannot use the selected method. Great idea.

❝ I have some another ones, but more bullet proofs rather than new features:

❝ [cut here]



❝ Moreover: In the manual selection of time points I have observed:

❝ Sometimes the very last point could not be selected. But

❝ [cut here]



Yes. I understand. What I am doing, when selecting data points, is to try not to click the exact location of the data point (sounds weird?), especially when there are crowded data points around or when the data point is very close to zero (as Helmut said above). You can do data point selection by just clicking around the data point (it's a trick!). The display screen of the graph seems cheating on us (?). In bear, the selection of data point does not necessarily to click the exact location of data point. I don't why, but it is just like that. You can try this next time. I know it's really frustrated when you try to select data point showing in the graph and get no luck.

❝ BTW: If you have very much spare time :-D I would highly recommend to refactor the bear code. It's a nightmare to make a


Very true! I have been working on it whenever I revise it. Very sorry about this. As the matter of the fact, I always wish in my mind to invite some colleagues (you, Helmut and many others) in this Forum to together maintain bear if they are interested in coding R. However the source code of bear is really a mess right now. I wish I have much time to do this in the future. Thank you for your messages.

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,
2010-12-13 11:26
(5250 d 00:26 ago)

(edited on 2010-12-13 13:26)
@ yjlee168
Posting: # 6296
Views: 13,467
 

 Bear: feature requests

Yung-jin,

if you need some help now and then, maybe I can help you.
If you want, you may send me some instructions about what has to be done, and if I've got some time, I will give it a try.
You already have my e-mail adress at work, so contact me if you are interested.

Ace


Edit: Full quote removed. Please delete anything from the text of the original poster which is not necessary in understanding your answer; see also this post! [Jaime]
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2010-12-13 14:29
(5249 d 21:23 ago)

@ Aceto81
Posting: # 6298
Views: 13,527
 

 Bear: feature requests

Dear Ace,

I though that you might have already switched to others...;-) That's why I did not mention you in my previous post. Thank you so much. Really appreciate. I will try to figure out how we can do it later. But first I have to make source codes at least readable. Yes, I know how to contact you by e-mail. Keep in touch.

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
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2013-03-27 14:21
(4414 d 21:30 ago)

@ Helmut
Posting: # 10294
Views: 11,986
 

 Geometric mean? re: Bear: feature requests

Dear Helmut & all,

Yes, I am doing this part. However, the question is all data points cannot be zero (the first data point is the case?) or strictly speaking all data points must greater than 1.0 (otherwise, it will cause negative values, such as log10(0.65)). It may be quite common to have some Cp < 1.0 in BE study. In R, there is some packages that can ignore that, such as the option 'zero.rm(foo)'; however, these packages are still not available for R3.0.0. Any suggestion? Thanks in advanced.

Think about geometric means/SD; some (European) regulators prefer a plot of geometric rather arithmetic means.

❝ Hint: SDgeom=exp(sqrt(1/(n-1) × Sum((ln(x)-ln(xgeom))²)) - hope, I got all the parentheses right.


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
★★★
avatar
Homepage
Vienna, Austria,
2013-03-27 15:18
(4414 d 20:34 ago)

@ yjlee168
Posting: # 10295
Views: 11,892
 

 Geometric mean in plots

Hi Yung-jin,

❝ However, the question is all data points cannot be zero (the first data point is the case?) or strictly speaking all data points must greater than 1.0 (otherwise, it will cause negative values, such as log10(0.65)). It may be quite common to have some Cp < 1.0 in BE study. In R, there is some packages that can ignore that, such as the option 'zero.rm(foo)'; however, these packages are still not available for R3.0.0.


Problems arise if at least one concentration is <LLOQ. Some people (like me) don’t report the geometric mean for this time point, others calculate the mean if ⅔ or ½ of concentrations are >LLOQ (excluding the BQLs). For the plots I would suggest to use backtransformed values – either in linear scale or with a log-axis.

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2013-03-27 22:16
(4414 d 13:35 ago)

@ Helmut
Posting: # 10300
Views: 12,065
 

 Geometric mean in plots

Dear Helmut,

Thanks for your messages. Yes, I do plot the conc. vs. time on a semilog scale with mean + sd. Hopefully, I wish that I have fixed bear to take care of this, such as using 'foo <- na.omit(foo)' for conc. < LLOQ. And I find the package I used (sciplot) can ignore the data point with value of zero (the first data point). For some reasons (which I still cannot figure out), semilog plots do not show at all, specially for multiple-dose, parallel study. I don't know if it is data dependent. However, the linear plots always works very well. Probably, I should consider to include both linear and semilog plots.

❝ Problems arise if at least one concentration is <LLOQ. Some people (like me) don’t report the geometric mean for this time point, others calculate the mean if ⅔ or ½ of concentrations are >LLOQ (excluding the BQLs). For the plots I would suggest to use backtransformed values – either in linear scale or with a log-axis.


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
UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,672 registered users;
82 visitors (0 registered, 82 guests [including 0 identified bots]).
Forum time: 12:52 CEST (Europe/Vienna)

There are two possible outcomes: if the result confirms the
hypothesis, then you’ve made a measurement. If the result is
contrary to the hypothesis, then you’ve made a discovery.    Enrico Fermi

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5