* * Example 10.3 from pp 358-360 * open data males.asc calendar(panelobs=8,a) 1980:1 all 545//1987:01 data(format=free,org=columns) 1//1980:01 545//1987:01 nr year ag black bus con ent exper fin hisp hlth $ hours man mar min nc ne occ1 occ2 occ3 occ4 occ5 occ6 occ7 occ8 occ9 per pro pub rur s school tra trad $ union wage * set expersq = exper**2 * * The panel regressions are run using the instruction PREG (Panel REGression). * METHOD=FIXED, METHOD=BETWEEN and METHOD=RANDOM are the options for fixed, * between and random. RATS uses a different algorithm for estimating the * component variances for random effects; you can use the VINDIV and VRANDOM, as * is done here, to feed in particular values. * preg(method=between) wage # constant school exper expersq union mar black hisp pub preg(method=fixed) wage # exper expersq union mar pub linreg wage # constant school exper expersq union mar black hisp pub preg(method=random) wage # constant school exper expersq union mar black hisp pub preg(method=random,vindiv=.1055,vrand=.1234) wage # constant school exper expersq union mar black hisp pub * * This repeats the above regressions, using REPORT to build the table. * report(action=define,hlabels=||"Variable","Between","Fixed Effects","OLS","Random Effects"||) preg(method=between) wage # constant school exper expersq union mar black hisp pub report(regress) preg(method=fixed) wage # exper expersq union mar pub report(regress) linreg wage # constant school exper expersq union mar black hisp pub report(regress) preg(method=random,vindiv=.1055,vrand=.1234) wage # constant school exper expersq union mar black hisp pub report(regress) report(action=format,picture="*.###") report(action=show)