//  tpr - VanHeuvelen & Long (tvanheuv@indiana.edu) | 2013-09-29
//  ologit in population

program define tpr_pop_omodel

    qui ologit $lhsnm $rhsnms
    mat b = r(table)
    forvalues ib = 1/$rhsN {
        global best`ib' = b[1,`ib']
        global bse`ib' = b[2,`ib']
    }
    local bcutloc = $rhsN
    local catsNm1 = $catsN - 1
    forvalues icut = 1/`catsNm1' {
        local ++bcutloc
        global bcut`icut' = b[1,`bcutloc']
    }

    quietly sum ycat
    global pop_ymin = r(min)
    global pop_ymax = r(max)

end
exit