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

posted by Helmut Homepage – Vienna, Austria, 2012-01-03 04:27 (5277 d 23:54 ago) – Posting: # 7854
Views: 13,819

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

Complete thread:

UA Flag
Activity
 Admin contact
23,654 posts in 4,992 threads, 1,571 registered users;
160 visitors (0 registered, 160 guests [including 18 identified bots]).
Forum time: 05:22 CEST (Europe/Vienna)

Always listen to experts.
They’ll tell you what can’t be done and why.
Then do it.    Robert A. Heinlein

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