/* artbin VERSION 2.2 EMZ 16june2022.// Changed 'proportions' to 'anticipated probabilities' VERSION 2.1 EMZ 16sep2021. // Added ltfu() option. VERSION 2.0 EMZ 20may2021. // Removed ngroups from the dialogue box and rearranged layout of set up boxes/options. Removed score box being ticked as default. Uses artbin_v127. VERSION 1.9 EMZ 03may2021. // Corrections from Henry Bern testing. VERSION 1.8 EMZ 15apr2021. // Changed to use with latest version of artbin (v126). VERSION 1.7 EMZ 29mar2021. // Took out non-inferiority check box and associated programming as no longer being included in documented syntax (old syntax). Changed the default allocation ratio from [1 1] to blank as it fails for >2 groups. VERSION 1.6 EMZ 29mar2021. // Changed Margin box title to NI/SS Margin. Moved trend and dose boxes up to set-up box section. VERSION 1.5 EMZ 01mar2021. // Reorganised dialogue box as per IW suggestion with main checkboxes for Wald/Score/Local/Conditional. VERSION 1.4 EMZ 25feb2021. // took out nvm box, put in fav/unfav options. If user selects NI button, don't allow condit, ccorrect or trend. Changed condit and uncondit from radio buttons to checkboxes so could be included in ni exclusion set, and made condit/uncondit mututally exclusive. Changed code so that if the user specifies condit then distant will not be allowed. Changed local and distant from radio buttons to checkboxes so could be included in condit exclusion. Made local and distant mutually exclusive. Don’t allow local and wald to be selected at the same time. Also don’t allow conditional and wald together. Made distant alternatives checkbox ticked as default. VERSION 1.3 EMZ 26oct2020. // added in noround option. Changed "Method" to be "Null variance method" and "one-sided alpha" to be "one-sided test"// VERSION 1.2 EMZ 07oct2020. VERSION 1.1 EMZ 12aug2020. VERSION 1.0 SB 03mar2004. Binary outcomes keyword: rclass */ VERSION 8.0 INCLUDE _std_large DIALOG main, title("ART - Binary outcomes") tabtitle("Main") BEGIN /*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+*/ GROUPBOX gb_setup 10 10 _iwd _ht14h, label("Set-up") TEXT tx_pro 15 30 90 ., label("Anticipated") TEXT tx_pro2 15 45 90 ., label("probabilities") EDIT vl_pr 110 40 120 ., label("Anticipated probabilities") option(pr) TEXT tx_margin 250 @ 120 ., label("Margin (NI/SS only)") EDIT vl_margin 370 @ 100 ., label("Margin") option(margin) RADIO r1_fav 15 72 120 ., first label("Favourable") option(fav) RADIO r2_unfav 110 @ 110 ., last label("Unfavourable") option(unfav) TEXT tx_all 250 @ 120 ., label("Allocation ratios") EDIT vl_aratios 370 @ 100 ., label("aratios") option(aratios) RADIO r1_rpow 15 102 120 ., first label("Specify power") option(rpow) RADIO r2_samp 110 @ 130 ., last label("Specify sample size") option(samp) TEXT tx_pow 250 @ 120 ., label("Power or N") EDIT vl_pow 370 @ 100 ., label("power") default(0.8) option(pow) TEXT tx_alp 15 128 90 ., label("Alpha") EDIT vl_alpha 110 @ 120 ., label("alpha") default(0.05) option(alpha) CHECKBOX ck_ones 250 @ 150 ., label("One-sided test (alpha)") option(ones) CHECKBOX ck_trend 15 157 170 ., label("Trend") option(trend) onclickon("script dose_on") onclickoff("script dose_off") TEXT tx_doses 70 156 90 ., label("Dose") EDIT vl_doses 110 156 120 ., label("Dose") option(doses) TEXT tx_ltfu 250 @ 120 ., label("Loss to follow-up") EDIT vl_ltfu 370 @ 100 ., label("ltfu") option(ltfu) GROUPBOX gb_options 10 190 _iwd _ht7h, label("Options") CHECKBOX ck_score 15 220 170 ., label("Score test (default)") /// onclickon(script main_ck_score_on) /// onclickoff(script main_ck_score_off) CHECKBOX ck_wald 150 @ 130 ., label("Wald test") option(wald) /// onclickon(script main_ck_wald_on) /// onclickoff(script main_ck_wald_off) CHECKBOX ck_loc 230 @ 230 ., label("Local alternatives") option(loc) /// onclickon(script main_ck_loc_on) /// onclickoff(script main_ck_loc_off) CHECKBOX ck_con 350 220 350 ., label("Conditional test (Peto)") option(con) /// onclickon(script main_ck_con_on) /// onclickoff(script main_ck_con_off) CHECKBOX ck_cc 15 250 170 ., label("Continuity correction") option(cc) CHECKBOX ck_noround 230 250 350 ., label("Do not round") option(noround) END SCRIPT dose_on BEGIN main.vl_doses.enable END SCRIPT dose_off BEGIN main.vl_doses.disable END PROGRAM disable_doses BEGIN call gaction main.ck_trend.disable END PROGRAM enable_doses BEGIN call gaction main.ck_trend.enable if main.ck_trend { call script dose_on } if ! main.ck_trend { call script dose_off } END ******************************** *make score and wald options mutually exclusive SCRIPT main_ck_score_on BEGIN main.ck_wald.disable END SCRIPT main_ck_score_off BEGIN main.ck_wald.enable END * If user selects condit, disable wald. SCRIPT main_ck_con_on BEGIN main.ck_wald.disable END SCRIPT main_ck_con_off BEGIN main.ck_wald.enable END /* * If user selects ni, disable conditional, ccorrect and trend options SCRIPT main_ck_ni_on BEGIN main.ck_con.disable main.ck_cc.disable main.ck_trend.disable END SCRIPT main_ck_ni_off BEGIN main.ck_con.enable main.ck_cc.enable main.ck_trend.enable END */ * also don't allow local and wald to be selected together SCRIPT main_ck_loc_on BEGIN main.ck_wald.disable END SCRIPT main_ck_loc_off BEGIN main.ck_wald.enable END SCRIPT main_ck_wald_on BEGIN main.ck_loc.disable main.ck_score.disable main.ck_con.disable END SCRIPT main_ck_wald_off BEGIN main.ck_loc.enable main.ck_score.enable main.ck_con.enable END ************************************ INCLUDE header HELP hlp1, label("Help") view("help artbindlg") RESET res1 PROGRAM command BEGIN require main.vl_pr put "artbin " /* EMZ change to make work with updated program*/ beginoptions optionarg main.vl_pr * optionarg main.vl_ngroups optionarg main.vl_aratios optionarg main.vl_margin optionarg main.vl_ltfu if main.ck_con { put "condit " } if main.ck_loc { put "local " } optionarg main.vl_alpha if main.r1_rpow { put "power("main.vl_pow ") " } if main.r2_samp { put "n("main.vl_pow ") " } if main.r1_fav { put "fav " } if main.r2_unfav { put "unf " } option main.ck_trend optionarg main.vl_doses /* EMZ change to option onesided(#) to onesided */ /* optionarg main.ck_ones */ if main.ck_ones { put "onesided " } /* EMZ change to option ccorrect(#) to ccorrect */ /* optionarg main.ck_cc */ if main.ck_cc { put "ccorrect " } if main.ck_wald { put "wald " } if main.ck_noround { put "noround " } endoptions END