* * Example 6.7 from page 209 * open data ceosal2.raw data(format=free,org=columns) 1 177 salary age college grad comten ceoten sales profits $ mktval lsalary lsales lmktval comtensq ceotensq profmarg * linreg lsalary # constant lsales lmktval ceoten * summarize(vector=||1.0,log(5000),log(10000),10||) * * Auxiliary regression to estimate the alphahat. The PRJ instruction generates the * fitted values from the regression. These are 'exp'ed back to levels. The * alphahat is the sole coefficient from the regression of salary on mhat. * prj lsalaryhat set mhat = exp(lsalaryhat) linreg salary # mhat compute alphahat=%beta(1) * disp "Mean Salary" exp(%sumlc)*alphahat