* * Example 15.5 * J. Wooldridge, Econometrics of Cross Section and Panel Data * * Note: The sample data files include all required data transformations. * However, in many cases we show how these data transformations would * be created in RATS from the basic data, as this is something you will * need to know how to do in practice. * open data pension.raw data(format=free,org=columns) 1 226 id pyears prftshr choice female married age educ $ finc25 finc35 finc50 finc75 finc100 finc101 wealth89 black stckin89 irain89 pctstck * * Linear model. * linreg pctstck # choice age educ female black married finc25 finc35 finc50 finc75 finc100 finc101 wealth89 prftshr constant * * Ordered probit. Drop the intercept. * ddv(type=ordered,dist=probit,cuts=cuts) pctstck # choice age educ female black married finc25 finc35 finc50 finc75 finc100 finc101 wealth89 prftshr * compute x1=%dot(%beta,||1,60.0,13.5,0,0,0,0,0,0,1,0,0,200,1||) compute x0=%dot(%beta,||0,60.0,13.5,0,0,0,0,0,0,1,0,0,200,1||) compute p00 =%cdf(cuts(1)-x1) compute p50 =%cdf(cuts(2)-x1)-p00 compute p100=1-p50-p00 disp "E(%stock|choice=1)" p00*0+p50*50+p100*100 compute p00 =%cdf(cuts(1)-x0) compute p50 =%cdf(cuts(2)-x0)-p00 compute p100=1-p50-p00 disp "E(%stock|choice=0)" p00*0+p50*50+p100*100