clear set more off * mata : mata clear run confa.mata, nostop use hs-cfa, clear timer clear 11 timer on 11 confa (vis: x1 x2 x3) (text: x4 x5 x6) (math: x7 x8 x9), from(iv) timer off 11 timer list 11 estadd scalar time = r( t11 ) est store confa_complete mat bbc = e(b) set seed 123456 forvalues k=1/9 { gen y`k' = cond( uniform()<0.0`k', ., x`k') } timer clear 12 timer on 12 confa (vis: y1 y2 y3) (text: y4 y5 y6) (math: y7 y8 y9), from(bbc) timer off 12 timer list 12 estadd scalar time = r( t12 ) est store confa_naive mat bbm = e(b) foreach f in bbm bbc iv smart ones { foreach m in nr dfp { forvalues dn = 0/1 { if `dn' local d difficult else local d di "{txt}Call options: {res}from(`f') technique(`m') `d'" timer clear 10 timer on 10 confa (vis: y1 y2 y3) (text: y4 y5 y6) (math: y7 y8 y9), from(`f') technique(`m') `d' missing timer off 10 timer list 10 estadd scalar time = r( t10 ) est store confa_m_`f'_`m'_`d' } } } est tab _all, stats( ll time ) esttab _all , scalars( ll time ) exit