* * CHAPTER 9 * Page 332 * open data ch09_mcas.xls data(format=xls,org=columns) 1 220 code regday specneed bilingua occupday tot_day $ s_p_c spec_ed lnch_pct tchratio percap totsc4 totsc8 avgsalry pctel * table / totsc4 tchratio pctel lnch_pct percap * set lpercap = log(percap) set percap2 = percap**2 set percap3 = percap**3 set tchratio2 = tchratio**2 set tchratio3 = tchratio**3 * * HIEL is defined to be a dummy indicating whether the percentage of English * learners is greater than the median. This will create that. Note, though, that * in this case, the median is 0, so it will just be a dummy for a positive value. * stats(fractiles) pctel set hiel = pctel>%median set strxhiel = tchratio*hiel * * * Table 9.2 * * Column 1 * linreg(robust) totsc4 # tchratio constant * * Column 2 * linreg(robust) totsc4 # tchratio pctel lnch_pct lpercap constant * * Column 3 * linreg(robust) totsc4 # tchratio pctel lnch_pct percap percap2 percap3 constant * * Column 4 * linreg(robust) totsc4 # tchratio tchratio2 tchratio3 pctel lnch_pct percap percap2 percap3 constant * * Column 5 * linreg(robust) totsc4 # tchratio hiel strxhiel lnch_pct percap percap2 percap3 constant * * Column 6 * linreg(robust) totsc4 # tchratio lnch_pct percap percap2 percap3 constant