kvoronov
☆    

Russia,
2019-11-20 11:55
(1810 d 17:05 ago)

Posting: # 20834
Views: 8,508
 

 Previously data point selection for lambda z estimate issue in bear [🇷 for BE/BA]

Hello BEBAC team,

when I tried to use dataset with previously selected points,
it seems that bear is trying to find columns:
"subj" "time" "conc" "conc_data" "drug"

but ***_lambda_z_select_all.RData contains:

"subj" "seq"  "prd"  "drug" "time" "conc"

and execution stops with
Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...)

I have also tried to rename columns, but I get the different result with same initial data.

Thanks in advance,
Kirill
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2019-11-20 15:07
(1810 d 13:52 ago)

@ kvoronov
Posting: # 20839
Views: 7,322
 

 Previously data point selection for lambda z estimate issue in bear

Hi Kirill,

Thanks for posting the issue here. Th term 'previously data point selection for lambda z' is kind of confusing. Here it means only for previously manual selection data point, not for ARS, AIC, TTT or any others. The default file name for 'previously manual data point selection for lambda z' is '***_lambda_z_manual_select_all.RData'

❝ when I tried to use dataset with previously selected points,

❝ it seems that bear is trying to find columns:

"subj" "time" "conc" "conc_data" "drug"


That's correct. This is the exact data format for 'previously manual data point selection for lambda z'. You have to select 'manual selection' under 'data point selection for lambda z estimate'. Then you will get this file (***_lambda_z_manual_select_all.RData) in your working directory.

❝ ...

❝ but ***_lambda_z_select_all.RData contains:

"subj" "seq"  "prd"  "drug" "time" "conc"


This is correct too. However, this file is just a part of NCA outputs in bear. It is absolutely not the 'previously manual data point selection for lambda z'.

Hope this can help.

All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
kvoronov
☆    

Russia,
2019-11-20 16:40
(1810 d 12:20 ago)

@ yjlee168
Posting: # 20842
Views: 7,308
 

 Previously data point selection for lambda z estimate issue in bear

Thank you yjlee168!

Is it possible to take both advantage of ARS method and manual selection for certain subjects?

It is important, because manual selection allows to choose only 2-6 data points for estimation of λz.

Any help will be appreciated!
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2019-11-20 18:12
(1810 d 10:48 ago)

@ kvoronov
Posting: # 20843
Views: 7,326
 

 combine ARS & manual selection for lambda z in bear

Hi Kirill,

❝ ...

❝ Is it possible to take both advantage of ARS method and manual selection for certain subjects?


Technically, it is of course possible; however, in regulatory aspect, I really don't know if it is OK to do so.

Here is how to do it technically:
  1. remove all subjects with insufficient data points (if using ARS) from your original dataset (say, 'orig.csv') first and save the reduced data as 'reduced.csv';
  2. run bear with dataset 'reduced.csv' and select ARS for lambda z estimate; if it runs OK, this step will generate '***_lambda_z_select_all.csv' (you already mentioned this previously);
  3. finally run bear with your original (or full) dataset (i.e., 'orig.csv') and choose 'manual selection' this time for lambda z estimate; now you can manually select the data points based on '***_lambda_z_select_all.csv' (ARS method) indicated for all subjects included in 'reduced.csv', and also you can manually select data points for the subjects (these subjects are excluded from 'orig.csv') without sufficient data points (manual selection). Sound kind of complicated, but it should work.

All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2019-11-20 18:32
(1810 d 10:28 ago)

@ yjlee168
Posting: # 20844
Views: 7,262
 

 Automatic → visual inspection/adjustment

Hi Yung-jin,

❝ Technically, it is of course possible; however, in regulatory aspect, I really don't know if it is OK to do so.


Why not? I do that for decades and never got a question from any agency.
  • Any [sic] automatic algo performs badly for “flat” profiles (e.g., modified release) and terrible for multiphasic products.
  • Visual inspection / adjustment recommended in the literature.
  • Stated not only in my SOP but also in the protocol: Automatic method first (I’m lazy and in most cases it works), adjustment second.
Of note, I get a lot of reports on my desk. Many were accepted by authorities despite crazy λz-estimations (see here and esp. there).

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,
2019-11-20 19:48
(1810 d 09:12 ago)

@ Helmut
Posting: # 20845
Views: 7,387
 

 Automatic → visual inspection/adjustment

Dear Helmut,

❝ Why not? I do that for decades and never got a question from any agency.


I see. for decades? :-D

❝ — Any [sic] automatic algo performs badly for “flat” profiles (e.g., modified release) and terrible for multiphasic products.


Right. It is indeed quite possible for some modified releases. It makes sense.

❝ — Visual inspection / adjustment recommended in the literature.

❝ — Stated not only in my SOP but also in the protocol: Automatic method first (I’m lazy and in most cases it works), adjustment second.


Smart strategy. :ok: Thanks for your messages. I learned.

All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2019-11-20 19:59
(1810 d 09:00 ago)

@ yjlee168
Posting: # 20846
Views: 7,305
 

 Automatic → visual inspection/adjustment

Hi Yung-jin,

❝ ❝ I do that for decades and never got a question from any agency.


❝ I see. for decades? :-D


[image]My first NCA-code was for a TI-59 in 1981. Had even a thermo-printer!
Serious coding on an HP 9826 started in 1982 and continued on an HP 9836. No hard-drive… IIRC, Unix on 6 floppies and Pascal / Rocky Mountain BASIC on another 5 each. :lol3:

When we switched to a Series 715 in 1993 (also serving our LAB/UX LIMS) …

[image]
[image]

… my code had already evolved into a 60,000+ lines monster.

[image]

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,
2019-11-20 22:05
(1810 d 06:55 ago)

@ Helmut
Posting: # 20847
Views: 7,269
 

 Automatic → visual inspection/adjustment

Dear Helmut,

It's really amazing and unbelievable. I think your first NCA codes running on TI-59 probably is the first NCA computer program in the world. I read your messages for many times and also browse all links that you provide. It really shocks me. It must be a very tough work to do programing with a TI-59 back to 1981. Frankly speaking, I still did not know what a 'computer' was in 1981. Not to mention computer programing. The only 'computer' I had in 1981 was a Casio palm calculator. My first computer was an Apple ][ around 1982-83. I used it to play games mostly.

Thanks for sharing your experiences in computer programing.

❝ My first NCA-code was for a TI-59in 1981...


All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2019-11-21 01:53
(1810 d 03:06 ago)

@ yjlee168
Posting: # 20848
Views: 7,379
 

 OT for nerds

Hi Yung-jin,

❝ It's really amazing and unbelievable. I think your first NCA codes running on TI-59 probably is the first NCA computer program in the world.


I don’t think so. I’m pretty sure that Carl Metzler’s NONLIN for a Sperry Univac mainframe could perform NCA left-handed. I wrote him a letter (yes, paper!) in 1982 and asked for the code. A couple of weeks later I received a 10.5" diameter reel of ½" 9-track magnetic tape. When I went to my IT department, they told me “Hey, we run a business here. We have COBOL! A FORTRAN compiler will cost 25,000 bucks. Go and find another playground.”

❝ It must be a very tough work to do programing with a TI-59 back to 1981.


It was. Learned the hard way to keep the code short. You had to find a compromise. The longer the code, the less storage registers you had and vice versa. But it was a pain in the back. Procedure was like this: Enter t/C-pairs for a subject. NCA performed and stored. When one formulation was finished, start over with the next one. Then the memory was almost full. Read another memory card, overwrite the NCA-code with the one for stats. Press a key and get the PE and CI. Studies were randomized but everybody used just a paired t-test. ANOVA on a TI-59? Didn’t even dream about it.

❝ Frankly speaking, I still did not know what a 'computer' was in 1981. Not to mention computer programing.


[image]I started with a Philips P354 in 1976. Punch card reader and the dreary green bar paper. It was used by the Austrian national bank for some years and when we received it as a gift it showed signs of heavy use… The one in our IT-lab. →
Note the pile of paper in the left corner. When you made a single mistake in punching the cards, the output went straight there. My first code was the bisection algo for finding roots of arbitrary functions. Took me two weeks…
On the other hand we were lucky to have this 180+ kg monster when “time-sharing” was the norm: You send the code to the university’s computing center only to get two weeks later a hand-written note saying “Did not compile, execution stopped with buffer overflow. Revise.”

Heinrich Koch of the University of Vienna proudly showed me his HP 85 and the code he developed with Wolfgang Ritschel at the university of Cincinnati. Crashed during the demo. I was not convinced. There were rumors that together with a Wang 2200 you get PK software “for free”. Wang had no representative in Austria and I didn’t want to trust on promises of the one in Germany. First steps into the world of dektop computing with an HP 9845 learning Pascal.

❝ The only 'computer' I had in 1981 was a Casio palm calculator. My first computer was an Apple ][ around 1982-83. I used it to play games mostly.


:-D Saw my first one in New York in 1983. Didn’t know what to do with the one-eyed mouse.

❝ Thanks for sharing your experiences in computer programing.


Welcome. Now you know why I was so happy to start with R (1.4.0 in 2001). A simple console, weighted polynomial regression just one line of code. Wonderful. I still write the php-scripts of the forum in a simple editor. I have fancy IDEs (Eclipse, Aptana). Never use them. Okay, boomer:smoke:

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
kvoronov
☆    

Russia,
2019-11-21 22:57
(1809 d 06:02 ago)

@ yjlee168
Posting: # 20855
Views: 7,107
 

 combine ARS & manual selection for lambda z in bear

Hello yjlee168, Hello Helmut!

I went through the steps described above. Results are not the same (because ARS in some cases chose more than 6 points) but still very close.

Thank you for your concern!
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2019-11-21 23:15
(1809 d 05:44 ago)

@ kvoronov
Posting: # 20856
Views: 7,150
 

 combine ARS & manual selection for lambda z in bear

Hi Kirill,

Good to hear that. And Helmut also added some comments about my concern in regulatory issue as you may have already read in this thread.

❝ I went through the steps described above. Results are not the same (because ARS in some cases chose more than 6 points) but still very close.


You said 'not the same...' about the final results. Compared to what? I get lost here.

All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
kvoronov
☆    

Russia,
2019-11-22 14:57
(1808 d 14:03 ago)

@ yjlee168
Posting: # 20860
Views: 7,060
 

 combine ARS & manual selection for lambda z in bear

Hi yjlee168,

So, I mean that when I choose 'manual selection' for lambda z estimate (step 3), I can manually select the data points based on previously generated '***_lambda_z_select_all.csv' (ARS method), but only for six points, although for some subjects '***_lambda_z_select_all.csv' contains more than six points.

Anyway, thanks again to you and Helmut!
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2019-11-22 21:48
(1808 d 07:12 ago)

@ kvoronov
Posting: # 20862
Views: 7,039
 

 bear v2.8.7 is released.

Hi Kirill,

I see your point now. I have increased the max. # of data point selection when using manual selection up to 24 (just cannot remove the limitation) and have already uploaded v2.8.7 to Sourceforge now. I will remove the limitation for 6 data points selection later and will upload soon. It can be done very quickly. Hope it's not too late for your need. Thank you so much for your messages.

❝ ... but only for six points, although for some subjects '***_lambda_z_select_all.csv' contains more than six points.


All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
kvoronov
☆    

Russia,
2019-11-25 19:14
(1805 d 09:46 ago)

@ yjlee168
Posting: # 20869
Views: 6,486
 

 bear v2.8.7 is released.

Thank you a lot yjlee168! I really appreciate your help. The best support!
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2019-11-25 21:46
(1805 d 07:14 ago)

@ kvoronov
Posting: # 20871
Views: 6,488
 

 auto switch from ARS to manual selection

Hi Kirill

Not quite. I am still not so happy about it. You still need to go through that 3 steps so far. That's really very manual. So I have already started adding a new feature that can automatically switch from ARS or other methods to manual selection. Currently, if one selects ARS for lambda z estimate, bear checks all subjects first to see if all are eligible to use ARS. If not, list all non-eligible subejcts and bear stops. So here is the new feature: bear will check if the subject (one by one) is eligible to use ARS. If yes, do ARS. If not, bear will automatically switch to manual selection for the user to continue. That's what I want. How does the idea sound?

❝ ... The best support!


All the best,
-- Yung-jin Lee
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
kvoronov
☆    

Russia,
2019-11-28 15:19
(1802 d 13:41 ago)

@ yjlee168
Posting: # 20885
Views: 6,414
 

 auto switch from ARS to manual selection

Hello, yjlee168!

It would be great. Automation can save time and possible errors.
Thank you again!
UA Flag
Activity
 Admin contact
23,280 posts in 4,889 threads, 1,655 registered users;
69 visitors (0 registered, 69 guests [including 15 identified bots]).
Forum time: 05:00 CET (Europe/Vienna)

There is one certainty in drug development
and statistics that one can depend on:
the data are always late.    Scott Patterson and Byron Jones

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