* File HOMEOWN.SHZ * LPM, LOGIT AND PROBIT MODELS * Sample Shazam program using data in Gujarati page 546 * with modification that the first five observations are changed to * 1 1 8 2 0 16 3 0 18 4 1 11 5 1 12 * because logit and probit give perfect fit using the original * Gujarati data * ------ SAVE SUBSEQUENT OUTPUT ----- * The following command will put output both on screen and in a file. * You may need to change the drive and directory in the next line FILE SCREEN A:\HOMEOWN.OUT * ------ DATA INPUT ---------- * First associate unit 11 to the input data file * You may need to change the drive and directory in the next line FILE 11 A:\HOMEOWN.DAT * Now read in the data set, which has three variables READ(11) FAMILY HOMEOWN INCOME * For small data sets print out the data to make sure read in properly PRINT FAMILY HOMEOWN INCOME * For all data sets get descriptive statistics to make sure read in properly STAT FAMILY HOMEOWN INCOME * ------ PLOT KEY DATA ------- * Simplest plot PLOT HOMEOWN INCOME * Ignore the following comment for this class * Prettier plot (will not work on all platforms) * PLOT HOMEOWN INCOME / GRAPHICS * If you instead want to print the file, the following command * sends the plot to a graphics file homeown.ps which can be pinted using * the PRINT command. I assume the printer recognizes postscript. * For more details (e.g. HP laser printer) read the SHAZAM manual. * PLOT HOMEOWN INCOME / GRAPHICS PAUSE PAUSE PORT=HOMEOWN.PS DEVICE=PS1 * ------ PERFORM REGRESSION ANALYSIS * Linear probability model estimated by OLS OLS HOMEOWN INCOME * See whether predicted values lie outside (0,1) interval * Use LIST option which prints residuals and predicted values OLS HOMEOWN INCOME / LIST * Logit model LOGIT HOMEOWN INCOME / LIST * Probit model PROBIT HOMEOWN INCOME / LIST STOP