* PS9.3, using DATA4-7, for the LM test in Example 9.4 read (data4-7) chd cal unemp cig edfat meat spirits beer wine ols chd cig edfat spirits beer / resid=ut * generate lag of ut genr ut1=ut(-1) * print ut and ut1 to see how ut1 is internally stored print ut ut1; * suppress first obs. because ut1 is not defined for it sample 2 34 * auxiliary regression for LM test ols ut cig edfat spirits beer ut1 * compute nrsquare statistic gen1 LM = $n*$r2 * compute pvalue for it distrib LM / type=chi df=1 stop