* * Examples from section 11.4.2, pp 376-378 * open data cps88.asc data(format=prn,org=columns) 1 1000 age exp2 grade ind1 married lnwage occ1 partt potexp union weight high * ddv(dist=probit) union # potexp exp2 married partt grade constant * * Compute the predicted probability of being in the union and the weights * prj(cdf=predu) * * Compute the overall density * density lnwage / wx fx * * Compute the weighted density on the non-union subsample * density(weight=1.0/(1-predu),smpl=.not.union) lnwage / wx fxtheta scatter(style=lines,klabels=||"Actual Density","Density without unions"||,key=upright) 2 # wx fx # wx fxtheta