/* midas_dlg_simdata.dlg — Simulate DTA datasets Version 2.0.0 30mar2026 Author: Ben Adarkwa Dwamena, MD */ VERSION 16.0 POSITION . . 420 340 DIALOG main, title("MIDAS — Simulate DTA Dataset") BEGIN TEXT tx_header 10 10 400 ., label("midas simdata — Generate synthetic 2x2 tables") GROUPBOX gb_req 10 35 400 110, label("Required Parameters") TEXT tx_n 20 55 130 ., label("N per study:") SPINNER sp_n 155 55 80 ., min(5) max(100000) default(100) TEXT tx_st 20 80 130 ., label("Number of studies:") SPINNER sp_st 155 80 80 ., min(2) max(1000) default(20) TEXT tx_lg 20 105 130 ., label("Logits (Se Sp):") EDIT ed_lg 155 105 200 ., default("1.5 2.5") /// tooltip("Mean logit Se and logit Sp, space-separated") TEXT tx_vlg 20 130 130 ., label("Var logits (Se Sp):") EDIT ed_vlg 155 130 200 ., default("0.5 0.3") /// tooltip("Between-study variance of logit Se and logit Sp") GROUPBOX gb_opt 10 155 400 90, label("Optional Parameters") TEXT tx_corr 20 175 130 ., label("Correlation:") EDIT ed_corr 155 175 80 ., default("-0.3") numonly /// tooltip("Between-study correlation (-1 to 1)") TEXT tx_prev 20 200 130 ., label("Prevalence:") EDIT ed_prev 155 200 80 ., default("0.5") numonly TEXT tx_pzero 20 225 130 ., label("Prop zero cells:") EDIT ed_pzero 155 225 80 ., default("0") numonly GROUPBOX gb_path 10 255 400 35, label("Output") TEXT tx_path 20 273 80 ., label("Path:") EDIT ed_path 105 271 290 ., tooltip("Directory for output files") END HELP hlp1, view("help midas_simdata") OK ok1, label("OK") CANCEL can1, label("Cancel") SUBMIT sub1, label("Submit") PROGRAM command BEGIN put "midas simdata" put ", n(" main.sp_n ")" put " studies(" main.sp_st ")" put " logits(" main.ed_lg ")" put " varlogits(" main.ed_vlg ")" if !main.ed_corr.isdefault() { put " corr(" main.ed_corr ")" } if !main.ed_prev.isdefault() { put " r(" main.ed_prev ")" } if !main.ed_pzero.isdefault() { put " p(" main.ed_pzero ")" } if main.ed_path { put `" path(""' put main.ed_path put `"")"' } END