use "http://www.learneconometrics.com/class/stata/rwm2003.dta", clear summarize gen H = hospvis >0 gen D = docvis>0 tabulate H D global xlist female age income hhkids educ married biprobit (H = $xlist) (D = $xlist) biprobit (H = $xlist) (D = $xlist), vce(cluster id) coeflegend margins, dydx(married) predict(equation(H)) margins, dydx(married) predict(equation(D)) margins, dydx(income) predict(equation(D)) use "http://www.learneconometrics.com/class/stata/burnett.dta", clear summarize global x1list acrep econfac pctwecn relig global x2list acrep relig pctwfac nor sou mid biprobit (gndrecon=$x1list womstud) (womstud=$x2list)