Priyanka_kocheta
☆    

India,
2009-12-03 13:12
(5619 d 15:02 ago)

Posting: # 4413
Views: 9,730
 

 Scaled Average Bioequivalence SAS Code [Software]

Hi...

Can U help me regarding Average Scaled Bioequivalence.

I want to know that the following code for this is correct.
/* Scaled BE Limit calculation;*/
data limit;
set Global_Switch(keep=Intra_Var_REF_LCmax Intra_Var_REF_LAUCt Intra_Var_REF_LAUCi);
teta=0.7956;
Cmax_limit=exp(teta*sqrt(Intra_Var_REF_LCmax));
AUCt_limit= exp(teta*sqrt(Intra_Var_REF_LAUCt));
AUCi_limit=exp(teta*sqrt(Intra_Var_REF_LAUCi));
run;
data abc;
set limit (keep=Cmax_limit);
select ;
when (Cmax_limit ge 0) BE_limit= Cmax_limit;
end;
run;
data abc1;
set limit (keep= AUCt_limit);
select ;
when (AUCt_limit ge 0) BE_limit= AUCt_limit;
end;
run;
data abc2;
set limit (keep=AUCi_limit);
select ;
when (AUCi_limit ge 0) BE_limit= AUCi_limit;
end;
run;
data abc3;
set abc(keep=BE_limit) abc1(keep=BE_limit) abc2(keep=BE_limit);
run;



Regards,
PK


Edit: Category changed; reformatted using BBCode. [Helmut]

Regards,
PK
d_labes
★★★

Berlin, Germany,
2009-12-03 14:42
(5619 d 13:32 ago)

@ Priyanka_kocheta
Posting: # 4414
Views: 8,485
 

 SABE SAS Code snippet

Dear PK,

❝ I want to know that the following code for this is correct.


❝ /* Scaled BE Limit calculation;*/

❝ data limit;

❝ set Global_Switch(keep=Intra_Var_REF_LCmax Intra_Var_REF_LAUCt

❝ Intra_Var_REF_LAUCi);

❝ teta=0.7956;

❝ Cmax_limit=exp(teta*sqrt(Intra_Var_REF_LCmax));

❝ [...]


❝ run; [...]



From this very limited code snippet it is not clear to me what it exactly does.
And therefore I'm not able to tell you if it is correct :-| .
One may guess that here a calculation of the widened bioequivalence limits is attempted, based on the reference intra-subject variance. But where do they come from? But the value of teta?

If my guess is correct, it's not the whole story.

For the statistical methods to use in SABE see for instance the very comprehensive reference mentioned in this post. See also this thread and last but not least use the search function (!) of the forum to find a lot of discussions here about SABE.

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2009-12-03 15:03
(5619 d 13:11 ago)

@ d_labes
Posting: # 4415
Views: 8,361
 

 Theta

Dear D. Labes!

❝ One may guess that here a calculation of the widened bioequivalence limits is attempted, based on the reference intra-subject variance.


Right guess!

❝ But where do they come from? But the value of teta?


OK, I would write theta... The value comes from the regulatory switching variation sigma0, because at CV 30% we get sqrt(ln(0.3²+1))=0.2936. It's calculated according to thetas=ln(1.25)/sigma0. For details see both threads you already quoted. ;-)

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,
2009-12-03 16:14
(5619 d 11:59 ago)

@ Helmut
Posting: # 4417
Views: 8,306
 

 Adam Riese's t(h)eta

Dear Helmut!

❝ It's calculated according to thetas=ln(1.25)/sigma0.


You mean ln(1.25)/0.2936 = 0.7956?
My EXCEL (2003, Service pack 3) gives 0.76. But as we both know: Never trust EXCEL :cool:.

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2009-12-03 16:27
(5619 d 11:46 ago)

@ d_labes
Posting: # 4418
Views: 8,377
 

 Adam Riese's t(h)eta

Dear D. Labes!

❝ You mean ln(1.25)/0.2936 = 0.7956?


I didn't give a value for theta, only a formula (OK, 0.2936 should read 0.29356037920852386775575620069739).

❝ My EXCEL (2003, Service pack 3) gives 0.76. But as we both know: Never trust EXCEL :cool:.


My calc.exe (XP Pro SP3) gives 0.7601282976804743229445271284299... ;-)

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,
2009-12-03 16:52
(5619 d 11:21 ago)

@ Helmut
Posting: # 4420
Views: 8,226
 

 T(h)eta

Dear Helmut!

❝ I didn't give a value for theta, only a formula


Ok, ok, I'm yet silent :-D .

But joke aside: it was my intention in the answer to questioning the value given in the code. I guess it is based on the Haidar et. al. suggested value for sigma0=0.25. But then the value in the code snippet is in the order of theta2! Then the formula implemented or the implementation is definitely wrong.

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2009-12-03 17:07
(5619 d 11:07 ago)

@ d_labes
Posting: # 4422
Views: 8,268
 

 T(h)eta

Dear D. Labes!

❝ But then the value in the code snippet is in the order of theta2! Then the formula implemented or the implementation is definitely wrong.


Right - it's wrong! Haidar et al. (2008) proposed a cutoff of sigma0 of 0.25, which transforms to a thetas of ~0.89 (I don't come up with all the numbers here). This value was seriously questioned in the paper by Tóthfalusi et al. (2009). If PK's idea is to go for a FDA submission (Haidar's paper given in some API-specific guidances), he/she should correct the code - which I don't understand anyhow, lacking the
[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
Priyanka_kocheta
☆    

India,
2009-12-08 08:29
(5614 d 19:45 ago)

@ Helmut
Posting: # 4440
Views: 8,198
 

 Result

Dear HS and D Labes,

I correct the code and value also.

I also verify it by FARTSSIE, I got same value from both.

I got scaled Bioequivalence from both is 75.68-132.14.

Now Pls tell me for showing Bioequivalece what criteria I have to apply.
  1. upper scaled BE limit is less then zero
  2. 95%CI is less than upper scaled BE limit (I calculated the 95%CI by normal Average bioequivalence).
In the scaled Average BE, if intra CV is >30 then we have to apply scaled BE approach otherwise we calculate only average bioequivalence?
In my calculation for Cmax its shows >30% Intra CV but for AUCt and AUCi its show <30%.

this is all for FDA subbmission study. So please guide me how I interpret result.

Regards,
PK

Regards,
PK
d_labes
★★★

Berlin, Germany,
2009-12-08 10:19
(5614 d 17:54 ago)

@ Priyanka_kocheta
Posting: # 4441
Views: 8,417
 

 SABE is not ABEL

Dear PK,

❝ I correct the code and value also.

❝ I also verify it by FARTSSIE, I got same value from both.


Fine!
But notice that FARTSSIE gives you also a lower widened BE limit.

❝ Now Pls tell me for showing Bioequivalece what criteria I have to apply.

❝ 1. upper scaled BE limit is less then zero

❝ 2. 95%CI is less than upper scaled BE limit (I calculated the 95%CI by normal Average bioequivalence).


You mixed up terms! I strongly suggest you to read the references I mentioned above! See also this thread.

ad 1.: With the formula for the widened BE limits you never get a value <0! Try it.
ad 2.: The 90% CI (calculated as usual/normal) must be contained in the widened BE limits. Tothfalusi et.al. call this "Average bioequivalence with expanding limits (ABEL)". But this is statistically only correct if you know (have the true) value of the intra-individual variability. But you have only an estimate from your data.
The rest of the story, the upper 95% confidence interval of the linearized SABE criterion
   (µTR)2-thetaS2*sigma2WR with thetaS=ln(1.25)/sigma0
you must read in the references or in the above mentioned thread, this post of mine. But notice that theta there is theta2 here.

❝ In the scaled Average BE, if intra CV is >30 then we have to apply scaled BE approach otherwise we calculate only average bioequivalence?


Yes.

❝ In my calculation for Cmax its shows >30% Intra CV but for AUCt and AUCi its show <30%.


So you have to go with SABE for Cmax only.

❝ this is all for FDA subbmission study.


So eventually you have to go with sigma0=0.25 according to Haidar et.al.

BTW: Can you explain from where you have the values of sigmaWR? What was the study design?

Regards,

Detlew
Priyanka_kocheta
☆    

India,
2009-12-08 10:49
(5614 d 17:25 ago)

@ d_labes
Posting: # 4442
Views: 8,459
 

 SABE is not ABEL

Dear D labes

I use following Code for SABE and calculating the value of sigma2WR

%MACRO Analysis(Par,Code);
PROC MIXED Data=****;
CLASSES Sequence Subject Period Treat;
MODEL Ln&Par= Sequence Period Treat/ DDFM=SATTERTH;
RANDOM Treat/TYPE=FA0(2) SUB=Subject(sequence) g;
REPEATED/GRP=Treat SUB=Subject;
ESTIMATE 'T vs. R' Treat -1 1/CL ALPHA=0.05;
LSMEANS TReat/ pdiff;
ODS OUTPUT G=Gmatrix&Code;
ODS OUTPUT CovParms=COVEST&Code;
ODS OUTPUT LSMEANS=LSM&Code;
ODS OUTPUT ESTIMATES=EST&Code;
title5 "&Par Analysis";
Title6 'Lntransformed Data';
Run;

DATA LSM&Code; SET LSM&Code; _NAME_="Ln&Par"; ORD=&Code;
DATA EST&Code; SET EST&Code; _NAME_="Ln&Par"; ORD=&Code;
RUN;

proc sql;
create table &Par.11 as (select col1 as &Par.11 from gmatrix&Code where row=1);
run;
proc sql;
create table &Par.12 as (select col1 as &Par.12 from gmatrix&Code where row=2);
run;
proc sql;
create table &Par.22 as (select col2 as &Par.22 from gmatrix&Code where row=2);
run;
data BIO&Code;
MERGE &Par.11 &Par.12 &Par.22;
run;
PROC SQL;
create table &Par._est_Ref as (SELECT ESTIMATE as ref_L&Par FROM COVEST&Code WHERE group='Treat R');
RUN;

PROC SQL;
create table &Par._est_test as (SELECT ESTIMATE as test_L&Par FROM COVEST&Code WHERE GROUP='Treat T');
RUN;
data Combine&Code;
merge &Par._est_Ref &Par._est_test;
run;

data Switch&Code;
merge bio&Code combine&Code;

    data Switch&Code;
    set Switch&Code;
    switch_L&Par = (  &Par.11 + &Par.22 - (2* &Par.12));
    Intra_Var_REF_L&Par=ref_L&Par;

    Intra_CV_TEST_L&Par  = 100*sqrt(exp(test_L&Par)-1);
    Intra_CV_REF_L&Par  = 100*sqrt(exp(ref_L&Par)-1);

    Intra_CV_SWITCH_L&Par = 100*sqrt(exp(switch_L&Par)-1);
    Intra_CV_GLOBAL_L&Par = 100*sqrt((exp((test_L&Par + ref_L&Par)/2)+ switch_L&Par -1));

%mend Analysis;

*Actual analysis ;
%Analysis(Cmax,1);
%Analysis(AUCt,2);
%Analysis(AUCi,3);
data Global_Switch;
merge Switch1 Switch2 Switch3 ;
run;
proc print data=Global_Switch width=full double noobs;
title 'Project No: ;
title5 ' Intra Subject Variability' ;
var Intra_Var_REF_LCmax Intra_CV_TEST_LCMAX Intra_CV_REF_LCMAX Intra_CV_SWITCH_LCMAX Intra_CV_GLOBAL_LCMAX  ;
var Intra_Var_REF_LAUCt Intra_CV_TEST_LAUCT Intra_CV_REF_LAUCT Intra_CV_SWITCH_LAUCT Intra_CV_GLOBAL_LAUCT;
var Intra_Var_REF_LAUCi Intra_CV_TEST_LAUCI Intra_CV_REF_LAUCI Intra_CV_SWITCH_LAUCI Intra_CV_GLOBAL_LAUCI;
run;
DATA LSM;
title '  ';
SET LSM1 LSM2 LSM3;
GeoMean=exp(Estimate);
run;

DATA EST;
SET EST1 EST2 EST3;
TbyR=Exp(Estimate);
CI_Lower=Exp(Lower);
CI_Upper=Exp((Upper));
ttab=abs(tinv(0.95,df));
pw=(log(1.25)/StdErr-ttab);
Power= probt(pw,df);
run;


* Scaled BE Limit clacualtion;
data limit;
set Global_Switch(keep=Intra_Var_REF_LCmax Intra_Var_REF_LAUCt Intra_Var_REF_LAUCi);
run;
data limit_final;
set limit;
teta=0.796689;
Cmax_limit=exp(sqrt(teta*Intra_Var_REF_LCmax));
AUCt_limit= exp(sqrt(teta*Intra_Var_REF_LAUCt));
AUCi_limit=exp(sqrt(teta*Intra_Var_REF_LAUCi));
run;
data abc;
set limit_final (keep=Cmax_limit);
if (Cmax_limit ge 0) then BE_limit= Cmax_limit;
run;
data abc1;
set limit_final (keep= AUCt_limit);
if (AUCt_limit ge 0) then BE_limit= AUCt_limit;
run;
data abc2;
set limit_final (keep=AUCi_limit);
if (AUCi_limit ge 0) then BE_limit= AUCi_limit;
run;
data abc3;
set abc(keep=BE_limit) abc1(keep=BE_limit) abc2(keep=BE_limit);
run;

*Cheking the 1) Point Estimate 2) (Ut-Ur)2 <= teta*sigma2wr conditions;
data intra1;
merge est (keep=_name_ tbyr ci_lower ci_upper power) abc3;
if tbyr >=0.8 and tbyr <=1.25 then BE="YES";else BE='NO';
IF ci_UPPER<= be_LIMIT THEN BE='YES';else BE='NO';
IF TBYR < 0.8 and TBYR > 1.25 and CI_UPPER > BE_LIMIT THEN BE='NO';
RUN;



Now pl tell me where am wrong?

Regards,
PK

Regards,
PK
d_labes
★★★

Berlin, Germany,
2009-12-08 13:10
(5614 d 15:04 ago)

@ Priyanka_kocheta
Posting: # 4444
Views: 8,125
 

 The power to know is not knowledge

Dear PK!

Sorry, but I'm not your software validator for free.
I'm not in the mood to do so and I have also not enough spare time.

Did you read my answers?
Did you read the references given?


Some more hints where your code is eventually flawed (first look only):
  • the G-matrix contains the inter-subject variability, not the intra-subject variances (I must confess that I cannot understand what you attempt to do with all that Intra_CV_Switch..., Intra_CV_global...)
  • if your study design is the extra-reference design (sequences TRR, RTR, RRT) as recommended by Haidar et.al., it is questionable if the FDA code (Appendix E of the guidance "Statistical approaches ...") gives reasonable estimates if the variabilities. We had a discussion about that here. Read it!
So my suggestion:
  1. Write down the algorithm you need to implement (first of course acquire knowledge about that algorithm). Steps, formulas ...
  2. Prepare sample data with known results or results calculated by hand or other software.
  3. Then begin coding.
  4. Test your code with sample data.
BTW: If you post again code, be so kind only for one PK parameter.
Another hint: Comment your code frequently! What do you attempt to do? It's not only for other readers, it's also for you if you look at it 1 year later.

Regards,

Detlew
Elshafeey
☆    

2011-11-02 22:46
(4920 d 05:28 ago)

@ Priyanka_kocheta
Posting: # 7588
Views: 6,994
 

 Scaled Average Bioequivalence SAS Code

Dear Priyanka_kocheta
can u help me on the SAS for scaled average bioeq i am not familiar with the data entry on SAS nor its language i can send u the SAS code recommended by the FDA 2011 but i do not know how to use it. if u can help me just reply
thanks


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! [Ohlbe]
UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,670 registered users;
32 visitors (0 registered, 32 guests [including 8 identified bots]).
Forum time: 05:14 CEST (Europe/Vienna)

The difference between a surrogate and a true endpoint
is like the difference between a cheque and cash.
You can get the cheque earlier but then,
of course, it might bounce.    Stephen Senn

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