/* nstagebin.dlg VERSION 3.0 DB 01Sept2014. n-stage trial sample size for binary outcomes */ VERSION 12 POSITION . . 500 280 LIST tunit BEGIN Year 6 Months Quarter Month Week Day Unspecified END LIST tunit_val BEGIN 1 2 3 4 5 6 7 END LIST nstage BEGIN 1 2 3 4 5 END LIST nstage_val BEGIN 1 2 3 4 5 END DIALOG tab1, title("Multi-Arm Multi-Stage Trial Designs") tabtitle("Design parameters") BEGIN TEXT tx_nstage 10 10 130 ., label("Total number of stages") COMBOBOX cb_nstage 150 @ 60 ., label("Total number of stages") option(nstage) contents(nstage) onselchangelist(nstage_action) dropdownl value(nstage_val) TEXT tx_allr 10 +35 90 ., label("E:C Allocation ratio") EDIT vl_allr1 150 @ 60 ., label("E:C Allocation ratio") default(1) option(allr1) numonly TEXT tx_allr2 215 @ 30 ., label(":1") TEXT tx_tunit 10 +35 180 ., label("Time unit (= 1 period)") COMBOBOX cb_tunit 150 @ 90 ., label("Time unit (= 1 period)") option(tunit) contents(tunit) dropdownl value(tunit_val) TEXT tx_extrat 10 +35 140 ., label("Delay for analysis (periods)") EDIT vl_extrat 150 @ 60 ., label("Delay for analysis (periods)") option(extrat) default(0) numonly CHECKBOX ck_prob 10 +35 300 ., label("Show probabilities for number of arms in each stage") option(probs) default(0) CHECKBOX ck_fwer @ +35 300 ., label("Calculate familywise error rate (FWER)") option(fwer) default(1) CHECKBOX ck_ess @ +35 300 ., label("Calculate expected sample sizes (ESS)") option(ess) default(0) END LIST nstage_action BEGIN script nst1 script nst2 script nst3 script nst4 script nst5 END SCRIPT nst1 BEGIN tab2.lb_stg1.show tab2.lb_stg2.hide tab2.lb_stg3.hide tab2.lb_stg4.hide tab2.lb_stg5.hide tab3.cb_ineqd.disable script ineqd_off END SCRIPT nst2 BEGIN tab2.lb_stg1.hide tab2.lb_stg2.show tab2.lb_stg3.hide tab2.lb_stg4.hide tab2.lb_stg5.hide tab3.cb_ineqd.enable END SCRIPT nst3 BEGIN tab2.lb_stg1.hide tab2.lb_stg2.hide tab2.lb_stg3.show tab2.lb_stg4.hide tab2.lb_stg5.hide tab3.cb_ineqd.enable END SCRIPT nst4 BEGIN tab2.lb_stg1.hide tab2.lb_stg2.hide tab2.lb_stg3.hide tab2.lb_stg4.show tab2.lb_stg5.hide tab3.cb_ineqd.enable END SCRIPT nst5 BEGIN tab2.lb_stg1.hide tab2.lb_stg2.hide tab2.lb_stg3.hide tab2.lb_stg4.hide tab2.lb_stg5.show tab3.cb_ineqd.enable END DIALOG tab2, tabtitle("Operating characteristics") BEGIN TEXT tx_stg 10 10 130 ., label("Choose stage:") LISTBOX lb_stg1 @ +20 100 75, label("Choose stage") contents(eqn_con1) onselchangelist(eqn_sel1) LISTBOX lb_stg2 @ @ @ @, label("Choose stage") contents(eqn_con2) onselchangelist(eqn_sel2) LISTBOX lb_stg3 @ @ @ @, label("Choose stage") contents(eqn_con3) onselchangelist(eqn_sel3) LISTBOX lb_stg4 @ @ @ @, label("Choose stage") contents(eqn_con4) onselchangelist(eqn_sel4) LISTBOX lb_stg5 @ @ @ @, label("Choose stage") contents(eqn_con5) onselchangelist(eqn_sel5) TEXT tx_acc1 10 +85 160 ., label("Total accrual rate (per period)") EDIT vl_acc1 170 @ 60 ., label("Total accrual rate") default(200) option(acc1) numonly EDIT vl_acc2 @ @ @ ., label("Total accrual rate") option(acc2) numonly EDIT vl_acc3 @ @ @ ., label("Total accrual rate") option(acc3) numonly EDIT vl_acc4 @ @ @ ., label("Total accrual rate") option(acc4) numonly EDIT vl_acc5 @ @ @ ., label("Total accrual rate") option(acc5) numonly TEXT tx_narms1 10 +30 160 ., label("Number of recruiting arms") EDIT vl_narms1 170 @ 60 ., label("Number of arms") default(5) option(narms1) numonly EDIT vl_narms2 @ @ @ ., label("Number of arms") option(narms2) numonly EDIT vl_narms3 @ @ @ ., label("Number of arms") option(narms3) numonly EDIT vl_narms4 @ @ @ ., label("Number of arms") option(narms4) numonly EDIT vl_narms5 @ @ @ ., label("Number of arms") option(narms5) numonly TEXT tx_alp1 10 +30 160 ., label("Significance level (one-sided)") EDIT vl_alpha1 170 @ 60 ., label("Significance level") default(0.2) option(alpha1) numonly EDIT vl_alpha2 @ @ @ ., label("Significance level") option(alpha2) numonly EDIT vl_alpha3 @ @ @ ., label("Significance level") option(alpha3) numonly EDIT vl_alpha4 @ @ @ ., label("Significance level") option(alpha4) numonly EDIT vl_alpha5 @ @ @ ., label("Significance level") option(alpha5) numonly TEXT tx_pow1 10 +30 160 ., label("Power") EDIT vl_pow1 170 @ 60 ., label("Power") default(0.95) option(pow1) numonly EDIT vl_pow2 @ @ @ ., label("Power") option(pow2) numonly EDIT vl_pow3 @ @ @ ., label("Power") option(pow3) numonly EDIT vl_pow4 @ @ @ ., label("Power") option(pow4) numonly EDIT vl_pow5 @ @ @ ., label("Power") option(pow5) numonly END LIST eqn_con1 BEGIN Stage 1 END LIST eqn_con2 BEGIN Stage 1 Stage 2 END LIST eqn_con3 BEGIN Stage 1 Stage 2 Stage 3 END LIST eqn_con4 BEGIN Stage 1 Stage 2 Stage 3 Stage 4 END LIST eqn_con5 BEGIN Stage 1 Stage 2 Stage 3 Stage 4 Stage 5 END LIST eqn_sel1 BEGIN script eqn1 END LIST eqn_sel2 BEGIN script eqn1 script eqn2 END LIST eqn_sel3 BEGIN script eqn1 script eqn2 script eqn3 END LIST eqn_sel4 BEGIN script eqn1 script eqn2 script eqn3 script eqn4 END LIST eqn_sel5 BEGIN script eqn1 script eqn2 script eqn3 script eqn4 script eqn5 END SCRIPT eqn1 BEGIN program hide_all tab2.vl_narms1.show tab2.vl_acc1.show tab2.vl_alpha1.show tab2.vl_pow1.show END SCRIPT eqn2 BEGIN program hide_all tab2.vl_narms2.show tab2.vl_acc2.show tab2.vl_alpha2.show tab2.vl_pow2.show END SCRIPT eqn3 BEGIN program hide_all tab2.vl_narms3.show tab2.vl_acc3.show tab2.vl_alpha3.show tab2.vl_pow3.show END SCRIPT eqn4 BEGIN program hide_all tab2.vl_narms4.show tab2.vl_acc4.show tab2.vl_alpha4.show tab2.vl_pow4.show END SCRIPT eqn5 BEGIN program hide_all tab2.vl_narms5.show tab2.vl_acc5.show tab2.vl_alpha5.show tab2.vl_pow5.show END PROGRAM hide_all BEGIN if !H(tab2.vl_narms1) { call gaction tab2.vl_narms1.hide call gaction tab2.vl_acc1.hide call gaction tab2.vl_alpha1.hide call gaction tab2.vl_pow1.hide } if !H(tab2.vl_narms2) { call gaction tab2.vl_acc2.hide call gaction tab2.vl_narms2.hide call gaction tab2.vl_alpha2.hide call gaction tab2.vl_pow2.hide } if !H(tab2.vl_narms3) { call gaction tab2.vl_acc3.hide call gaction tab2.vl_narms3.hide call gaction tab2.vl_alpha3.hide call gaction tab2.vl_pow3.hide } if !H(tab2.vl_narms4) { call gaction tab2.vl_narms4.hide call gaction tab2.vl_acc4.hide call gaction tab2.vl_alpha4.hide call gaction tab2.vl_pow4.hide } if !H(tab2.vl_narms5) { call gaction tab2.vl_narms5.hide call gaction tab2.vl_acc5.hide call gaction tab2.vl_alpha5.hide call gaction tab2.vl_pow5.hide } END DIALOG tab3, tabtitle("Intermediate outcome") BEGIN GROUPBOX gb_setupi 10 5 480 140, label("Design Parameters for Intermediate Outcome (if applicable)") CHECKBOX cb_ineqd 25 +20 300 ., label("Intermediate and primary outcomes differ") option(ineqd) onclickon("script ineqd_on") onclickoff("script ineqd_off") TEXT tx_fui 25 +30 130 ., label("Length of f/u (periods)") EDIT vl_fui 165 @ 60 ., label("Length of f/u (periods)") default(0) option(fui) numonly TEXT tx_ctrlpi 270 @ 130 ., label("Control arm event rate") EDIT vl_ctrlpi 410 @ 60 ., label("Control arm event rate") default(0.5) option(ctrlpi) numonly TEXT tx_theta0i 25 +30 130 ., label("Risk difference under H0") EDIT vl_theta0i 165 @ 60 ., label("Risk difference under H0") default(0) option(theta0i) numonly TEXT tx_theta1i 270 @ 130 ., label("Risk difference under H1") EDIT vl_theta1i 410 @ 60 ., label("Risk difference under H1") default(0.1) option(theta1i) numonly TEXT tx_ltfui 25 +30 130 ., label("Loss to follow-up rate") EDIT vl_ltfui 165 @ 60 ., label("Loss to follow-up rate") default(0) option(ltfui) numonly GROUPBOX gb_ppv 10 155 480 50, label("Positive Predictive Values") TEXT tx_ppvc 25 +20 90 ., label("PPV (control)") EDIT vl_ppvc 165 @ 60 ., label("PPV (control)") default(0.9) option(ppvc) TEXT tx_ppve 270 @ 90 ., label("PPV (experimental)") EDIT vl_ppve 410 @ 60 ., label("PPV (experimental)") default(0.9) option(ppve) END DIALOG tab4, tabtitle("Primary outcome") BEGIN GROUPBOX gb_setupd 10 5 480 115, label("Design Parameters for Primary Outcome") TEXT tx_fud 25 +25 130 ., label("Length of f/u (periods)") EDIT vl_fud 165 @ 60 ., label("Length of f/u (periods)") default(0) option(fud) numonly TEXT tx_ctrlpd 270 @ 130 ., label("Control arm event rate") EDIT vl_ctrlpd 410 @ 60 ., label("Control arm event rate") default(0.5) option(ctrlpd) numonly TEXT tx_theta0d 25 +30 130 ., label("Risk difference under H0") EDIT vl_theta0d 165 @ 60 ., label("Risk difference under H0") default(0) option(theta0d) numonly TEXT tx_theta1d 270 @ 130 ., label("Risk difference under H1") EDIT vl_theta1d 410 @ 60 ., label("Risk difference under H1") default(0.1) option(theta1d) numonly TEXT tx_ltfud 25 +30 130 ., label("Loss to follow-up rate") EDIT vl_ltfud 165 @ 60 ., label("Loss to follow-up rate") default(0) option(ltfud) numonly END SCRIPT ineqd_on BEGIN tab3.vl_fui.enable tab3.vl_ctrlpi.enable tab3.vl_theta0i.enable tab3.vl_theta1i.enable tab3.vl_ltfui.enable tab3.vl_ppvc.enable tab3.vl_ppve.enable END SCRIPT ineqd_off BEGIN tab3.vl_fui.disable tab3.vl_ctrlpi.disable tab3.vl_theta0i.disable tab3.vl_theta1i.disable tab3.vl_ltfui.disable tab3.vl_ppvc.disable tab3.vl_ppve.disable END COPY copy1, uaction(command) target(cmdwin) OK ok1, label("OK") CANCEL can1, label("Cancel") SUBMIT sub1, label("Submit") HELP hlp1, label("Help") view("help nstagebin") RESET res1 PROGRAM command BEGIN put "nstagebin " beginoptions put "accrate(" /hidden tab2.vl_acc1 if tab2.vl_acc2 { put " " /hidden tab2.vl_acc2 } if tab2.vl_acc3 { put " " /hidden tab2.vl_acc3 } if tab2.vl_acc4 { put " " /hidden tab2.vl_acc4 } if tab2.vl_acc5 { put " " /hidden tab2.vl_acc5 } put ") " put "arms(" /hidden tab2.vl_narms1 if tab2.vl_narms2 { put " " /hidden tab2.vl_narms2 } if tab2.vl_narms3 { put " " /hidden tab2.vl_narms3 } if tab2.vl_narms4 { put " " /hidden tab2.vl_narms4 } if tab2.vl_narms5 { put " " /hidden tab2.vl_narms5 } put ") " put "theta0(" if tab1.cb_nstage.isneq("1") { if tab3.vl_theta0i.isenabled() { put tab3.vl_theta0i " " } } put tab4.vl_theta0d put ") " put "theta1(" if tab1.cb_nstage.isneq("1") { if tab3.vl_theta1i.isenabled() { put tab3.vl_theta1i " " } } put tab4.vl_theta1d put ") " put "ctrlp(" if tab1.cb_nstage.isneq("1") { if tab3.vl_ctrlpi.isenabled() { put tab3.vl_ctrlpi " " } } put tab4.vl_ctrlpd put ") " put "alpha(" /hidden tab2.vl_alpha1 if tab2.vl_alpha2 { put " " /hidden tab2.vl_alpha2 } if tab2.vl_alpha3 { put " " /hidden tab2.vl_alpha3 } if tab2.vl_alpha4 { put " " /hidden tab2.vl_alpha4 } if tab2.vl_alpha5 { put " " /hidden tab2.vl_alpha5 } put ") " put "power(" /hidden tab2.vl_pow1 if tab2.vl_pow2 { put " " /hidden tab2.vl_pow2 } if tab2.vl_pow3 { put " " /hidden tab2.vl_pow3 } if tab2.vl_pow4 { put " " /hidden tab2.vl_pow4 } if tab2.vl_pow5 { put " " /hidden tab2.vl_pow5 } put ") " put "fu(" if tab1.cb_nstage.isneq("1") { if tab3.vl_fui.isenabled() { put tab3.vl_fui " " } } put tab4.vl_fud put ") " put "ltfu(" if tab1.cb_nstage.isneq("1") { if tab3.vl_ltfui.isenabled() { put tab3.vl_ltfui " " } } put tab4.vl_ltfud put ") " if tab1.cb_nstage.isneq("1") { put "ppvc(" tab3.vl_ppvc ") " put "ppve(" tab3.vl_ppve ") " } if tab1.vl_allr1 { put "aratio(" tab1.vl_allr1 ") " } if tab1.vl_extrat { put "extrat(" tab1.vl_extrat ") " } if tab1.ck_prob { put "probs " } if !tab1.ck_fwer { put "nofwer " } if tab1.ck_ess { put "ess " } optionarg tab1.cb_nstage optionarg tab1.cb_tunit endoptions END