* R. Carter Hill, William E. Griffiths and Guay C. Lim, * Principles of Econometrics, Fourth Edition, Wiley, 2011. * Chapter 16 Probit and logit estimation of a model of * transport choice. SAMPLE 1 21 * Data on automobile and public transportation travel * time for 21 individuals. The variables are: * autotime commute time via auto, minutes * bustime commute time via bus, minutes * dtime bus time - auto time * auto = 1 if auto chosen READ (transport.dat) / names * Probit estimation, top of page 593 PROBIT auto dtime / COEF=BETA * Suppose travel by public transportation takes 20 minutes * longer than auto travel. * Find the increase in the probability of travel by auto. GEN1 INDEX = (BETA:1)*2 + BETA:2 * Evaluate the standard normal probability density function. DISTRIB INDEX / PDF=FXB * Calculate the marginal effect, page 593 GEN1 PROB=FXB*BETA:1 PRINT PROB * Prediction exercise, page 593 DIM Y1 22 X1 22 PHAT 22 SAMPLE 22 22 GENR X1=3 FC Y1 X1 / MODEL=PROBIT COEF=BETA LIST PREDICT=PHAT PRINT X1 PHAT * Note: The forecast diagnostics listed by the FC command have * no meaningful interpretation in this example that computes * out-of-sample predictions. * The forecast diagnostics are only valid for within sample predictions. * Exercise 16.2, page 624 * (a) Logit estimation of the model of transport choice. SAMPLE 1 21 LOGIT auto dtime / COEF=BETA * (b) Estimate a marginal effect GEN1 INDEX = (BETA:1)*2 + BETA:2 GEN1 FXB = EXP(-INDEX)/(1+EXP(-INDEX))**2 GEN1 PROB=FXB*BETA:1 PRINT PROB * (c) Prediction exercise SAMPLE 22 22 FC Y1 X1 / MODEL=LOGIT COEF=BETA LIST PREDICT=PHAT PRINT X1 PHAT STOP