* * Example 7.8 from page 231 * open data lawsch85.raw data(format=free,org=columns) 1 156 rank salary cost lsat gpa libvol faculty age clsize north south east west lsalary studfac top10 r11_25 r26_40 r41_60 llibvol lcost * * This shows how to create the rank dummies * set top10 = rank<=10 set r11_25 = rank>=11.and.rank<=25 set r26_40 = rank>=26.and.rank<=40 set r41_60 = rank>=41.and.rank<=60 set r61_100 = rank>=61.and.rank<=100 * linreg lsalary # constant top10 r11_25 r26_40 r41_60 r61_100 lsat gpa llibvol lcost * * Calculate and display the percentage differences * disp "Exact Percentage Advantages Over Schools Rank>100" disp "Top 10" 100*(exp(%beta(2))-1) disp "11-25 " 100*(exp(%beta(3))-1) disp "26-40 " 100*(exp(%beta(4))-1) disp "41-60 " 100*(exp(%beta(5))-1) disp "61-100" 100*(exp(%beta(6))-1) * * Joint test of variables other than the rank dummies * exclude # lsat gpa llibvol lcost * * Regression with rank alone rather than the categories * linreg lsalary # constant rank lsat gpa llibvol lcost exclude # lsat gpa llibvol lcost