clear set mem 500M use http://swd.ucsd.edu/ps1, clear describe clogit y tcost1 tcost3 distdiff dded cabdiff cded gp gped threshdiff home cfinc com prn2 onplid blkout prazo organize hleg spline* , group(depper) clogit y tcost1 tcost3 distdiff cabdiff gp gped threshdiff home prn2 onplid blkout prazo organize hleg spline* , group(depper) * Table 5 * Table 5 - Predicted Values use http://swd.ucsd.edu/table5hyp, clear predict proby, pc1 list type proby * Table 5 - Confidence Intervals matrix V = get(VCE) matrix coefs=e(b) drop * svmat V, names(col) outsheet using "covar.csv", comma replace drop * matrix c2=coefs' svmat c2, names() outsheet using "coefs.csv", comma replace * Now run R program (see website) * Table 6 * Note that partisanship figures were entered manually and rounded. * DLOW=-5, DHIGH=-1.2, NLOW=-5, NHIGH=-1.2 * technically, log(.006) = -5.115996..., and log(.30) = -1.203973... use http://swd.ucsd.edu/table6hyp, clear predict proby, pc1 gen logprobyXhome=log(proby)*home collapse (sum) logprobyXhome, by(typenum home dtcost ntcost) gen pswitch=1-exp(logprobyXhome) di in red "Table 6 Replication" table dtcost ntcost if home==1, c(mean pswitch ) format(%8.3f)