PK_Lover
☆    

Portugal,
2014-11-21 01:28
(3415 d 13:52 ago)

Posting: # 13895
Views: 18,395
 

 Difficulties with NCA BEAR [🇷 for BE/BA]

Hello all,

I am trying BEAR for the first time for a simple NCA and ANOVA analysis for a 2x2x2 BE study data.

I have arranged all the data in a .csv file with subj,seq,perd,time,conc and I have maintained T0=0 and all the other LLOQ (either at the start of the schedule or at the end) as NA.

I ran BEAR, import the file, the values appear correctly in the table. It starts the analysis, it shows some pk values but then states:

Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
  NA/NaN/Inf in 'y'


and crashes. I have checked all the data, seems ok.

Could you please help me and tell me whats wrong?

Thank you!
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2014-11-21 08:34
(3415 d 06:46 ago)

(edited by yjlee168 on 2014-11-21 11:05)
@ PK_Lover
Posting: # 13898
Views: 16,415
 

 Difficulties with NCA BEAR

Dear PK_Lover,

Could you post the setting content from R console here after running 'go()' at the beginning? Something like:

 -------------------  Current settings ------------------

                 Methods Setting                  which_is
1              run demo?       1                       yes
2          study design?       0           2x2x2 crossover
3  single-/multiple-dose       0               single-dose
4      lambda_z estimate       0          adj. R sq. (ARS)
5        trapezoidal AUC       0        linear-up/log-down
6      BE criterion (LL)      80               lower limit
7                   ODA?       0                        no
8                  dose?  100000                dose given
9        dosing interval      24       *multiple-dose only
10                 Tlast     120       *multiple-dose only
11                 pAUC?       0                   all AUC
12            pAUC_start     121 the starting time of pAUC
13              pAUC_end     128      the end time of pAUC
14           IDP output?       0                        no

 The plot label of x-axis -> Time after Dosing (hr)
  and the label of y-axis -> DrugX Plasma Conc. (ng/mL)
 --------------------------------------------------------
...

Is your analysis using the partial or truncated AUC (pAUC) with multiple-dosed? If yes, please make sure that pAUC_start and pAUC_end should count from the time of starting dose (i.e., time = 0.), not within one dosing interval. If not, please turn pAUC off (= 0). Sorry about this error.

❝ [...]

❝ I ran BEAR, import the file, the values appear correctly in the table. It starts the analysis, it shows some pk values but then states:


Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :

❝ NA/NaN/Inf in 'y'


❝ and crashes. I have checked all the data, seems ok.

❝ [...]


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

Portugal,
2014-11-22 01:07
(3414 d 14:12 ago)

@ yjlee168
Posting: # 13911
Views: 16,177
 

 Difficulties with NCA BEAR

Dear yjlee168,

thank you very much for your quick reply (I am honored!).

I am sorry for not replying earlier but I did not have access to the station where I have R installed until now.

Here is the setup (it is the default):

Methods Setting which_is
1 run demo? 0 no
2 study design? 0 2x2x2 crossover
3 single-/multiple-dose 0 single-dose
4 lambda_z estimate 0 adj. R sq. (ARS)
5 trapezoidal AUC 0 linear-up/log-down
6 BE criterion (LL) 80 lower limit
7 ODA? 0 no
8 dose? 100000 dose given
9 dosing interval 24 *multiple-dose only
10 Tlast 120 *multiple-dose only
11 pAUC? 0 all AUC
12 pAUC_start 121 the starting time of pAUC
13 pAUC_end 128 the end time of pAUC
14 IDP output? 0 no

The plot label of x-axis -> Time after Dosing (hr)
and the label of y-axis -> DrugX Plasma Conc. (ng/mL)


And I am using data from a simple Crossover design with 2 periods, single administration.
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2014-11-22 04:21
(3414 d 10:59 ago)

@ PK_Lover
Posting: # 13912
Views: 16,202
 

 Difficulties with NCA BEAR

Dear PK_Lover,

Do you use the default setting to analyze your data? I think the error is due to failure to find a lambda_z during NCA (invalid 'y' when doing linear regression). If the error still persists, please check your data carefully. Or try to switch lambda_z estimation method to 'Select 2-6 data points manually' (lambda_z estimation = 5) instead of using the default of 'Adjusted R sq. (ARS).' By the way, manual data point selection may also provide you a chance to check subjects' data individually. Hope this can help.

❝ [...]


❝ And I am using data from a simple Crossover design with 2 periods, single administration.


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

Portugal,
2014-11-22 10:47
(3414 d 04:32 ago)

(edited by PK_Lover on 2014-11-22 11:18)
@ yjlee168
Posting: # 13913
Views: 16,179
 

 Difficulties with NCA BEAR

Dear yjlee168,

Yes, I think that is a possibility since I have some LLOQ points for the last collections.

I will try it manually and then will let the forum know if it worked ok.

Thank you very much!

EDIT: It worked like a charm! NCA and ANOVA done! Thanks a lot! I should change my nickname to BEAR_Lover! :)
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2014-12-01 09:13
(3405 d 06:06 ago)

@ PK_Lover
Posting: # 13959
Views: 16,000
 

 help test NCA BEAR

Dear PK_Lover,

Great to hear that everything was going fine. Since I like to alert users about the error as you had, I have bear v2.6.4 (pre-release) ready to release. Unfortunately, I cannot reproduce the data set to test it. Could you please help (only when you are available; no rush at all) me to test bear? If you can, please download bear v2.6.4 from my wuala cloud storage here (bear_2.6.4.zip). Then set lambda_z estimation as ARS (or TTTARS, TTT, AIC, TTTAIC?) with your data set. See install.txt if you need to know how to install it. It is not a beforehand check-up for all subject's data points first, but will show a warning message before the crash message when dealing with invalid 'y'. Thanks in advanced.

❝ ...

EDIT: It worked like a charm! NCA and ANOVA done! Thanks a lot! I should change my nickname to BEAR_Lover! :)

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
Emrah Soner Özdeş
☆    

Turkey,
2015-01-15 15:37
(3359 d 23:42 ago)

@ yjlee168
Posting: # 14293
Views: 15,562
 

 help test NCA BEAR

Dear yjlee168;

First of all I need to say that I am grateful for you guys for developing such a useful tool for BE/BA studies.

Currently I have the latest version of both R and the BEAR package. I am having the same issue mentioned in the first messaga of the thread.

It runs smooth until the 16th subject and stops in the 17th subjects, probably because of a BLOQ value in subject 17.

The workaround of manual selection of points worked fine with me. But as you guess it is not very practical and time consuming. I used to use WNL for NCA analysis, and have the feeling of the method of WNL for Lambdaz calculation (Rsq adjusted) is the most reliable one (I never tried the other methods).

So is there any other solution to this problem other than manuel selection ?


I found the solution before your reply.

I just replaced BLOQ values at the end with "NA" and it worked like a magic.

Got the hint from: http://pkpd.kmu.edu.tw/bear/

Best Regards

Emrah Soner Özdeş


Edit: Merged with a follow-up post. You can edit your original post for 24 hours. [Helmut]
Jam
☆    

UK,
2015-01-23 09:55
(3352 d 05:25 ago)

@ Emrah Soner Özdeş
Posting: # 14314
Views: 15,313
 

 help test NCA BEAR

I get the same problem when profiles have zero values towards the end of the profile. Also, I found my version of Excel (2013) produces CSV files with a comma at the end of each line. This seems to cause Bear to misread the CSV files.
Nevertheless I very much appreciate having the package.

Jam


Edit: Full quote removed. Please delete everything from the text of the original poster which is not necessary in understanding your answer; see also this post! [Ohlbe]
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2015-01-25 05:35
(3350 d 09:44 ago)

@ Jam
Posting: # 14319
Views: 15,265
 

 CSV files with a comma at the end of each line?

Dear Jam,

Thanks for using bear and your interesting messages. But I don't quite understand why is 'CSV files with a comma at the end of each line.' Is it normal for MS-Excel 2013 to produce a csv that way? Or did you have extra settings to save/export that kind of csv from Excel 2013? It sounds like that Excel is treated your dataset as if there is still data after the end of each row.

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

Mexico,
2016-09-16 00:44
(2750 d 15:35 ago)

@ yjlee168
Posting: # 16646
Views: 12,816
 

 Difficulties with NCA BEAR

Dear yjlee168

I had the same problem, thanks to your contribution, I changed the default settings as you said and the issue was solved.

❝ Do you use the default setting to analyze your data? I think the error is due to failure to find a lambda_z during NCA (invalid 'y' when doing linear regression). If the error still persists, please check your data carefully. Or try to switch lambda_z estimation method to 'Select 2-6 data points manually' (lambda_z estimation = 5) instead of using the default of 'Adjusted R sq. (ARS).' By the way, manual data point selection may also provide you a chance to check subjects' data individually. Hope this can help.



Edit: Full quote removed. Please delete everything from the text of the original poster which is not necessary in understanding your answer; see also this post #5! [Helmut]
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2016-09-16 11:42
(2750 d 04:37 ago)

(edited by yjlee168 on 2016-09-16 18:00)
@ xtianbadillo
Posting: # 16647
Views: 12,832
 

 old bear and friends

Dear xtianbadillo,

I wonder that you are using the previous version of bear. I have already fixed the error since v2.7.1. Now it's v2.7.7.

The error comes from that the data point selection method (such as ARS) fails to select at least three data points after Cmax to estimate λz. Thus, there is no drug plasma conc. (i.e., 'y') selected at all. That's what the error messages tell us. In other words, you may have at least one subject who had insufficient data points (≧ 3 data points after Cmax) to estimate λz. May I know what version of bear you used? You can upgrade bear from Sourceforge if you like (not on CRAN any more; very sorry about that). And try it again with the same dataset using ARS or others. It will tell you which subjects get involved with insufficient data points.

Hope this can help.

❝ ...I changed the default settings as you said and the issue was solved.


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
VStus
★    

Poland,
2016-09-26 15:30
(2740 d 00:49 ago)

@ yjlee168
Posting: # 16684
Views: 12,435
 

 old bear and friends

Dear yjlee168,

❝ The error comes from that the data point selection method (such as ARS)


In 2.7.7 I've got an error trying to process a dataset from multiple-dose trial, regardless of the fact that I've selected 'multiple dose' in config. Is there a way to turn-off assessment of elimination parameters for multiple dose trials?

I wanted to recalculate AUCtau and confirm Cmax and Cmin values after switching to originally obtained concentrations.

'R.split[[j]]':index outside of borders
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2016-09-26 20:04
(2739 d 20:16 ago)

@ VStus
Posting: # 16685
Views: 12,375
 

 multiple-dosed study with bear

Dear VStus,

The error sounds like that bear import null data points to analyze. Do you set proper values for both the dosing interval and Tlast (the time of the last dose given counted from time zero) with a multiple-dosed study (check with the cheat-sheet for bear setup)? If you worry about the data points for λz, you can switch to manual selection. However, the function of estimating λz cannot be turned off. Hope this can help. Good luck.

❝ ...

'R.split[[j]]':index outside of borders


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
VStus
★    

Poland,
2016-10-11 11:01
(2725 d 05:19 ago)

@ yjlee168
Posting: # 16715
Views: 12,199
 

 multiple-dosed study with bear

Dear Yung-jin Lee,

I'm finally back to the topic of multiple dose studies in bear. I've switched locale of error messages to English, so there will be no translation errors.

So yes, with the config I assume to be correct for multiple-dose study and standard Lambda_z assessment:
 -----------------  Current settings ----------------

                Methods                                     Setting
                 ------                                      ------
          study design?                             2x2x2 crossover
            dosing type                               multiple dose
     <U+03BB>z estimate                            adj. R sq. (ARS)
        trapezoidal AUC                          linear-up/log-down
   BE criterion (LL, %)                                          80
             dose (mg)?                                          10
                 ------                                      ------
        dosing interval                                          24
                  Tlast                                         168
                 ------                                      ------
 drug plasma conc. unit                                       ng/mL


I'm getting the same error:
Warning: Next to save all linear regression plots for λz estimation.
 It may take a while to finish. Press Enter to proceed...
Error in R.split[[j]] : subscript out of bounds


So, I change setup to select points manually and stuck with another issue: blank graph.
[image]

And, finally, error and halt of bear when I select stop for the graph:
****************************************************************************
 Data for the Ref. Products:                                               
----------------------------------------------------------------------------
 Cmax_ss, Tmax_ss, AUC(tau)ss, ln(Cmax_ss), ln(AUC(tau)ss), T1/2(z), 
  Vd/F, MRT, λz, Cl/F, Cav and Fluctuations will be calculated.
                                                                           
****************************************************************************
Waiting to confirm page change...
Error in setNames(data.frame(data), value.name) :
  'names' attribute [1] must be the same length as the vector [0]


It worked for me somehow previously (maybe previous version of bear?). Maybe I'll dig into the code to just avoid estimation of elimination parameters for multiple dose studies?

Thank you very much in advance!
I use bear from time to time for my work and it's very helpful!

Regards, VStus
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2016-10-11 12:15
(2725 d 04:04 ago)

@ VStus
Posting: # 16718
Views: 12,251
 

 multiple-dosed study with bear

Dear Vstus,

I just run the demo of multiple-dose with bear. It is ok. Please make sure that your Tlast is set correctly (the dosing interval looks fine). For example, the following case has Tlast = 120 and dosing interval = 24.

 Time      conc.
  0.0       0.00
 72.0     283.80
 96.0     319.33
120.0     298.06
120.5     634.75
121.0     792.06
121.5     825.69
122.0     900.31
122.5    1083.75
123.0    1273.44
124.0    1475.38
126.0    1981.88
128.0    1669.88
130.0    1324.44
132.0    1052.69
144.0     245.91


BTW, in your setting why dose (mg)?      dose? The dose should be numeric in the unit of mg.

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
VStus
★    

Poland,
2016-10-11 12:37
(2725 d 03:43 ago)

@ yjlee168
Posting: # 16720
Views: 12,116
 

 multiple-dosed study with bear

Dear Yung-jin Lee,

❝ Please make sure that your Tlast is set correctly (the dosing interval looks fine). For example, the following case has Tlast = 120 and dosing interval = 24.


My dataset includes only concentrations obtained during last (7th) day of treatment period. Last tablet was given on 7th day (that's why I've entered 168 hrs). Sampling is 24 hrs (for dosing period-only). Change of Tlast to 120 not helps.

My understanding is that I should add pre-steady state samples. Correct?

❝ BTW, in your setting why dose (mg)?      dose?


I've removed it intentionally from post to avoid breaking NDA :)

Regards, VStus
VStus
★    

Poland,
2016-10-12 12:37
(2724 d 03:42 ago)

@ yjlee168
Posting: # 16726
Views: 12,249
 

 multiple-dosed study with bear

Dear Yung-jin Lee,

Thank you very much for your help!
It appeared that my dataset was buggy. After corrections and manual selection of timepoints for elimination it finally worked.

Regards,
VStus
yjlee168
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2016-10-12 20:42
(2723 d 19:37 ago)

@ VStus
Posting: # 16727
Views: 11,958
 

 multiple-dosed study with bear [solved]

Dear VStus,

Great and very happy to know that the problem has been solved. Have a a nice day.

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
UA Flag
Activity
 Admin contact
22,957 posts in 4,819 threads, 1,638 registered users;
81 visitors (0 registered, 81 guests [including 9 identified bots]).
Forum time: 15:20 CET (Europe/Vienna)

Nothing shows a lack of mathematical education more
than an overly precise calculation.    Carl Friedrich Gauß

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