* Restricted Least Squares * Reference: Section 8.5 of * R. Carter Hill, William E. Griffiths and George G. Judge, * Undergraduate Econometrics, Second Edition, Wiley. SAMPLE 1 30 READ (TAB8-3.shd) Q PB PL PR M / SKIPLINE=1 * Transform the data to logarithms GENR LQ=LOG(Q) GENR LPB=LOG(PB) GENR LPL=LOG(PL) GENR LPR=LOG(PR) GENR LM=LOG(M) * Estimate a log-log demand function. Use the RESTRICT option to * impose the restriction of no "money illusion". OLS LQ LPB LPL LPR LM / LOGLOG RESTRICT RESTRICT LPR+LPB+LPL+LM=0 END * Now try the alternative estimation method by substituting the * restrictions directly into the equation (Equation R8.8, p.183) GENR LP1=LOG(PB/PR) GENR LP2=LOG(PL/PR) GENR L3=LOG(M/PR) OLS LQ LP1 LP2 L3 / LOGLOG * Recover the coefficient estimate on ln(Pr) TEST -LP1-LP2-L3 STOP