Helmut
★★★
avatar
Homepage
Vienna, Austria,
2012-01-03 04:27
(4880 d 17:24 ago)

Posting: # 7854
Views: 11,909
 

 FDA’s RSABE code (lenghty!) [RSABE / ABEL]

Hi to all copypasters!

I have mislaid the Apr 2010 draft, but in the current Feb 2011 version five lines of SAS code are missing. Well, not really missing, but printed in white on a white background. Here is the entire stuff in all its beauty (missing lines in red):

Example SAS Codes: partial reference-replicated 3-way design

Dataset containing TEST observations:
data test;
  set pk;
  if trt='T';
  latt=lauct;
run;


Dataset containing REFERENCE 1 observations:
data ref1;
  set ref;
  if (seq=1 and per=2) or (seq=2 and per=1) or (seq=3 and per=1);
  lat1r=lauct;
run;


Dataset containing REFERENCE 2 observations:
data ref2;
  set ref;
  if (seq=1 and per=3) or (seq=2 and per=3) or (seq=3 and per=2);
  lat2r=lauct;
run;


Determine Iij and Dij
data scavbe;
  merge test ref1 ref2;
  by seq subj;
  ilat=latt-(0.5*(lat1r+lat2r));
  dlat=lat1r-lat2r;
run;


Intermediate analysis - ilat
proc glm data=scavbe;
  class seq;
  model ilat=seq/clparm alpha=0.1;
  estimate 'average' intercept 1 seq 0.3333333333 0.3333333333 0.3333333333;
  ods output overallanova=iglm1;
  ods output Estimates=iglm2;
  ods output NObs=iglm3;
  title1 'scaled average BE';
run;


IGLM2:
pointest=exp(estimate);
x=estimate**2–stderr**2;
boundx=(max((abs(LowerCL)),(abs(UpperCL))))**2;


Intermediate analysis - dlat
proc glm data=scavbe;
  class seq;
  model dlat=seq;
  ods output overallanova=dglm1;
  ods output NObs=dglm3;
  title1 'scaled average BE';
run;


DGLM1:
dfd=df;
s2wr=ms/2;


From the above parameters, calculate the final 95% upper confidence bound:
theta=((log(1.25))/0.25)**2;
y=-theta*s2wr;
boundy=y*dfd/cinv(0.95,dfd);
sWR=sqrt(s2wr);
critbound=(x+y)+sqrt(((boundx-x)**2)+((boundy-y)**2));


Example SAS Codes: fully replicated 4-way design

Dataset containing TEST 1 observations:
data test1;
  set test;
  if (seq=1 and per=1) or (seq=2 and per=2);
  lat1t=lauct;
run;


Dataset containing TEST 2 observations:
data test2;
  set test;
  if (seq=1 and per=3) or (seq=2 and per=4);
  lat2t=lauct;
run;


Dataset containing REFERENCE 1 observations:
data ref1;
  set ref;
  if (seq=1 and per=2) or (seq=2 and per=1);
  lat1r=lauct;
run;


Dataset containing REFERENCE 2 observations:
data ref2;
  set ref;
  if (seq=1 and per=4) or (seq=2 and per=3);
  lat2r=lauct;
run;


Determine Iij and Dij
data scavbe;
  merge test1 test2 ref1 ref2;
  by seq subj;
  ilat=0.5*(lat1t+lat2t-lat1r-lat2r);
  dlat=lat1r-lat2r;
run;


Intermediate analysis - ilat
proc mixed data=scavbe;
  class seq;
  model ilat =seq/ddfm=satterth;
  estimate 'average' intercept 1 seq 0.5 0.5/e cl alpha=0.1;
  ods output CovParms=iout1;
  ods output Estimates=iout2;
  ods output NObs=iout3;
  title1 'scaled average BE';
  title2 'intermediate analysis - ilat, mixed';
run;


IOUT2:
pointest=exp(estimate);
x=estimate**2–stderr**2;
boundx=(max((abs(lower)),(abs(upper))))**2;


Intermediate analysis - dlat
proc mixed data=scavbe;
  class seq;
  model dlat=seq/ddfm=satterth;
  estimate 'average' intercept 1 seq 0.5 0.5/e cl alpha=0.1;
  ods output CovParms=dout1;
  ods output Estimates=dout2;
  ods output NObs=dout3;
  title1 'scaled average BE';
  title2 'intermediate analysis - dlat, mixed';
run;


DOUT1:
s2wr=estimate/2;
DOUT2:
dfd=df;

From the above parameters, calculate the final 95% upper confidence bound:
theta=((log(1.25))/0.25)**2;
y=-theta*s2wr;
boundy=y*dfd/cinv(0.95,dfd);
sWR=sqrt(s2wr);
critbound=(x+y)+sqrt(((boundx-x)**2)+((boundy-y)**2));


Calculation of unscaled 90% bioequivalence confidence intervals:
PROC MIXED
  data=pk;
  CLASSES SEQ SUBJ PER TRT;
  MODEL LAUCT = SEQ PER TRT/ DDFM=SATTERTH;
  RANDOM TRT/TYPE=FA0(2) SUB=SUBJ G;
  REPEATED/GRP=TRT SUB=SUBJ;
  ESTIMATE 'T vs. R' TRT 1 -1/CL ALPHA=0.1;
  ods output Estimates=unsc1;
  title1 'unscaled BE 90% CI - guidance version';
  title2 'AUCt';
run;


data unsc1;
  set unsc1;
  unscabe_lower=exp(lower);
  unscabe_upper=exp(upper);
run;


Enjoy!

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

NJ,
2013-01-14 20:47
(4503 d 01:05 ago)

@ Helmut
Posting: # 9837
Views: 7,178
 

 FDA’s RSABE code (lenghty!)

Hi Helmut,

I was just checking the 4-way full rep code. You wrote:

From the above parameters, calculate the final 95% upper confidence bound:

theta=((log(1.25))/0.25)**2;


From the progesterone FDA guidance Dec 2012. I see different equation for theta:

theta=((log(1.11111))/0.1)**2;

Yours is wrong?

Thanks
John
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2013-01-14 22:40
(4502 d 23:12 ago)

@ jag009
Posting: # 9839
Views: 7,367
 

 FDA’s RSABE code (lenghty!)

Hi John,

❝ ❝ From the above parameters, calculate the final 95% upper confidence bound:

❝ ❝ theta=((log(1.25))/0.25)**2;


❝ From the progesterone FDA guidance Dec 2012. I see different equation for theta:


theta=((log(1.11111))/0.1)**2;


❝ Yours is wrong?


Nope. Maybe you had the warfarin-guidance also open in your reader. :-D

Yours would mean downscaling. In the Dec 2012 revision FDA corrected only the ‘visibility’ (missing lines which were formatted in white on a white background). The formula I gave is still the same (upscaling) like in previous versions. See p.6 for the partial replicate and p.8 for the full replicate.

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

Only dead fish go with the current.    Scuba divers' proverb

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