* * Example AUTOMANU.DAT from pp 562-571 * open data automanu.dat data(format=free,org=columns) 1 100 share adratio priceratio * spgraph(vfields=3,$ footer="Figure 13-17. Market share, advertising ratio, and price ratio of auto manufacturer") graph(header="Market Share in Percentage") # share graph(header="Advertising Ratio to Industry") # adratio graph(header="Price Ratio to Industry") # priceratio spgraph(done) * table / share adratio priceratio * * Look at ACF's of the series and its first difference * @bjident(diffs=1) share * * Try a model with just the first difference * boxjenk(diffs=1,const) share @regcorrs * * Get rid of the constant * boxjenk(diffs=1) share * * Advertising Ratio univariate model * @bjident(diffs=1) adratio * * Tentative model is ARIMA(1,1,0) * boxjenk(diffs=1,const,ar=1) adratio * * Again, drop the constant * boxjenk(diffs=1,ar=1) adratio / pwad @regcorrs * * Prewhiten the share variable * boxjenk(diffs=1,ar=1,method=eval,initial=%beta) share / pwshare * @crosscorr(report) pwad pwshare * * Fit the base transfer function model * boxjenk(diffs=1,inputs=1,applydiffs) share # adratio 0 0 1 @regcorrs * @crosscorr pwad %resids * * Price Ratio Univariate Model * @bjident(diffs=1) priceratio boxjenk(diffs=1,const,ar=1) priceratio @regcorrs * * Same without the constant * boxjenk(diffs=1,ar=1) priceratio / pwprice * * Prewhiten the share series * boxjenk(diffs=1,ar=1,method=eval,initial=%beta) share / pwshare * @crosscorr(report) pwprice pwshare * * Estimate base transfer function model * boxjenk(diffs=1,inputs=1,applydiffs) share # priceratio 0 0 1 @regcorrs * * Add MA(1) noise term * boxjenk(diffs=1,ma=1,inputs=1,applydiffs) share # priceratio 0 0 1 @regcorrs @crosscorr pwprice %resids * * Add a denominator term to the transfer function * boxjenk(diffs=1,ma=1,inputs=1,applydiffs) share # priceratio 0 1 1 @regcorrs @crosscorr pwprice %resids * * Base transfer function with both inputs * boxjenk(diffs=1,inputs=2,applydiffs) share # adratio 0 0 1 # priceratio 0 1 1 @regcorrs * * Add MA(1) error term * boxjenk(diffs=1,ma=1,inputs=2,applydiffs) share # adratio 0 0 1 # priceratio 0 1 1 @regcorrs * * Note shown in text - forecasting with the three variable system. Estimate the * final choices for the models, and define equations for them. * boxjenk(diffs=1,ar=1,define=adeq) adratio / rad boxjenk(diffs=1,ar=1,define=priceeq) priceratio / rprice boxjenk(diffs=1,ma=1,inputs=2,applydiffs,define=shareeq) share / rshare # adratio 0 0 1 # priceratio 0 1 1 * * Estimate the variance/covariance matrix of the three sets of residuals. (This * is necessary for computing standard errors of forecast). * vcv(matrix=v) # rad rprice rshare * * Create a model named fullmodel from them * group(vcv=v) fullmodel adeq priceeq shareeq * forecast(model=fullmodel,steps=10,stderrs=stderrs,print) print / stderrs