* Reference: Chapter 8 of * Ernst R. Berndt, The Practice of Econometrics, Addison-Wesley, 1991. SAMPLE 1 54 READ (PALDA) YEAR SALES ADVER INC DUM1 DUM2 DUM3 / SKIPLINE=1 * Exercise 2, p. 420. * (a) GENR RATIO=ADVER/SALES STAT RATIO GRAPH RATIO / TIME LINEONLY * (b) Equation (8.54), p. 403. GENR LAGSALE=LAG(SALES) SAMPLE 2 54 OLS SALES LAGSALE ADVER DUM1 DUM2 DUM3 / DLAG RSTAT * Equation (8.55), p. 403 * Change to base ten GENR LLADV=(LOG(ADVER))/2.3206 GENR DUM=DUM1+DUM2 GENR TIME=TIME(0) OLS SALES LAGSALE LLADV DUM TIME INC / DLAG RSTAT * (c) Estimate a 90% duration interval for advertising - the * length of time (in years) required to attain 90% of the * total sales response. OLS SALES LAGSALE ADVER DUM1 DUM2 DUM3 TEST LOG(1-0.9)/LOG(LAGSALE) * Convert to length of time in months TEST 12*LOG(1-0.9)/LOG(LAGSALE) * The results show some variation from those of the Palda study. * The textbook, p. 403, finds a 90% duration interval of 4.95 * years, or 59.4 months. DELETE / ALL * Now analyze monthly data SAMPLE 1 522 READ (PALDAM) YRMON MADV MSALES / SKIPLINES=1 * Exercise 2, p. 420. * (a) GENR MRATIO=MADV/MSALES STAT MRATIO GRAPH MRATIO / TIME LINEONLY * (e) Create dummy variables IF (YRMON.LE.1413) MDUM1=1 IF ((YRMON.GE.1500).AND.(YRMON.LE.2513)) MDUM2=1 IF ((YRMON.GE.2600).AND.(YRMON.LE.4013)) MDUM3=1 GENR LAGMSALE=LAG(MSALES) SAMPLE 2 522 OLS MSALES LAGMSALE MADV MDUM1-MDUM3 / DLAG RSTAT * Estimate the implied 90% duration interval TEST LOG(1-0.9)/LOG(LAGMSALE) * (f) Convert to quarterly data SAMPLE 1 522 GENR YR0=INT(YRMON/100) GEN1 NQ=522/3 PRINT NQ SAMPLE 1 NQ GENR QSALES=SUM(MSALES,3) GENR QADV=SUM(MADV,3) GENR YR=SUM(YR0,3)/3 IF(YR.LE.14.1) QDUM1=1 IF((YR.GE.14.9).AND.(YR.LE.25.1)) QDUM2=1 IF ((YR.GE.25.9).AND.(YR.LE.40.1)) QDUM3=1 * Check that the dummy variables are constructed correctly PRINT YR QDUM1 QDUM2 QDUM3 GENR LAGQSALE=LAG(QSALES) SAMPLE 2 NQ OLS QSALES LAGQSALE QADV QDUM1-QDUM3 / DLAG RSTAT * Estimate the implied 90% duration interval - convert to months by * multiplying by 3. TEST 3*LOG(1-0.9)/LOG(LAGQSALE) STOP