* ::::::::::::::::::::::::::::::::::::::::::::::: * : : : 第2回中間解析で用いる閾値計算補助プログラム : : (JCOGデータセンター統計部門) : : 作成: 200608/08 : : Version: 1.0.0 : : : * ::::::::::::::::::::::::::::::::::::::::::::::: * %MACRO SecondInterimAnalysis( title="boundary computation", /*----- design parameters -----*/ alpha=0.05, /* 1-sided alpha of the trial */ event_t1=100, /* # of events, 1ST interim analysis */ event_t2=200, /* # of events, 2ND interim analysis */ e_event=300, /* expected # of events */ a_spending=1, /* use of alpha spending function, 1=use, 0=not-use (arbitrary comsumption) */ /*----- cumulative alpha parameters for arbitrary comsumption -----*/ alpha_t1=0.01, alpha_t2=0.03, /*----- precsion parameters -----*/ l_grid =1E-10 /* length of searching grid/precision */ ) ; %PUT ; OPTIONS NONOTES PAGENO=1 ; %IF (&ALPHA.<&ALPHA_t1. OR &ALPHA.<&ALPHA_t2. OR &ALPHA_t2.<&ALPHA_t1.) %THEN %DO ; data _null_ ; PUT "エラー(code 1): α消費の設定が矛盾しています. 計算するためにパラメータの再設定が必要とされます" ; run ; %END ; %ELSE %DO ; TITLE3 &TITLE. ; DATA _NULL_ ; eps=&l_grid. ; /* length of searching grid/precision */ alpha=&alpha. ; /* 1-sided alpha of the trial */ EVE1=&event_t1. ; /* # of events, 1ST interim analysis */ EVE2=&event_t2. ; /* # of events, 2ND interim analysis */ E=&e_event. ; /* expected # of events */ t1=EVE1/E ; /* information time at the 1st interim analysis */ t2=EVE2/E ; /* information time at the 2nd interim analysis */ %IF &A_SPENDING.=1 %THEN %DO ; alpha1=2-2*PROBNORM(PROBIT(1-0.5*alpha)/sqrt(t1)) ; /* spending alpha for 1st analysis */ alpha2=2-2*PROBNORM(PROBIT(1-0.5*alpha)/sqrt(t2)) ; /* spending alpha for 1st analysis */ %END ; %IF &A_SPENDING.=0 %THEN %DO ; alpha1=&alpha_t1. ; alpha2=&alpha_t2. ; %END ; C1=PROBIT(1-alpha1) ; /* threshold for 1st analysis */ C2=PROBIT(1-alpha2) ; /* initial value */ *** GRID SEARCHING PHASE *** ; do until (alpha_eps" THR1")" ; put "  第二回中間解析:情報時間=" t2 " 消費α=" alpha2 ; put "          閾値=" C2 "( 近似ハザード比>" THR2")" ; put ; put ; put ; RUN ; %END ; %MEND SecondInterimAnalysis ; %SecondInterimAnalysis ;