*! version 0.1.0 2013-12-06 | vanheuvelen long

* tpr: save results from failed ologit estimation

program define tpr_sim_OLMfailed

    scalar BRstatus = OLstatus
    matrix BRvec = BRtried, BRstatus, null4vec
    matrix OLvec = OLtried, OLstatus, e(N), OLconverged, OLrc, ///
        OLnullvec, OLnullvec, $samplesize, $isample, OLicnullvec
    scalar GLstatus = .b // ologit failed
    matrix GLvec = GLtried, GLstatus, ., ., ., GLnullvec, ///
        GLnullvec, GLicnullvec
    matrix PRvec = PRnullvec
	matrix OPvec = OPnullvec
    matrix WAvec = WAtried, .b, ., ., ., .
    matrix LRvec = LRtried, .b, ., ., ., .
    foreach nm of varlist $x_names {
        matrix WA`nm'vec = .b, ., ., ., .
        matrix BR`nm'vec = .b, ., ., ., .
    }

end
exit