?=================================================================== ? Application of ARCH model to Pesaran's expected inflation data. = ? Self contained. No modification required. = ?=================================================================== READ ; nobs = 54 ; nvar = 2 ; names = pa,pe ; by variables$ .99 1.62 1.87 2.89 2.23 1.69 3.67 5.20 6.59 11.94 7.78 7.19 8.98 8.80 6.91 4.20 5.04 4.92 5.33 5.94 8.11 7.88 6.63 2.76 2.70 3.14 2.53 2.55 2.76 4.55 7.11 5.50 5.78 7.42 4.32 2.14 1.25 4.93 2.61 2.19 3.24 3.35 1.55 1.79 1.59 2.49 1.88 1.28 1.83 3.46 1.69 1.36 1.95 3.11 0.79 1.94 2.97 3.37 3.65 1.62 3.02 4.43 4.70 8.13 10.6 7.48 7.28 7.63 6.26 6.76 5.86 6.09 6.23 6.94 7.86 8.73 7.04 6.16 4.02 3.89 3.69 4.14 3.95 4.82 5.96 6.39 5.73 6.78 5.74 3.47 2.24 2.04 3.44 3.37 3.55 4.10 2.70 2.10 1.58 2.14 2.56 1.62 1.78 3.33 2.91 1.76 2.26 2.70 SAMPLE ; 3-54$ CREATE ; pe1 = pe[-1] ; pe2 = pe[-2] ; pa1 = pa[-1] ; pa2 = pa[-2] ; y = pe-pe1 ; x1 = pa-pe1 ; x2 = pa1-pe2 $ NAMELIST ; X = x1,x2 $ ? ? For this exercise, all observations is 3 to 54. Replaces SAMPLE;ALL$ ? So, 2-T1 is 4 to T1 and 2-T is 4 to T since the first 2 observations are lost. ? SAMPLE ; 3 - 54 $ ? CALCULATE ; T1 = 54 ; T = T1 - 1 $ REGRESS ; Lhs = y ; Rhs = X ; Res = e $ MATRIX ; b0 = b $ SAMPLE ; 4 - T1 $ CREATE ; u = e ^ 2 ; u1 = e[-1] ^ 2 $ NAMELIST ; Z = one,u1 $ REGRESS ; Lhs = u ; Rhs = Z ; keep = ht $ MATRIX ; a0 = b $ CREATE ; zstar1=1/ht ; zstar2=u1/ht ; ustar=u/ht-1 $ REGRESS ; Lhs = ustar ; Rhs = zstar1,zstar2 $ MATRIX ; alpha = b & a0 ; va=varb ; stat(alpha,va) $ CALCULATE ; lmtest = N * rsqrd ; chi(lmtest,1) $ CREATE ; hstar = alpha(1) + alpha(2) * u1 $ SAMPLE ; 4 - T$ CREATE ; rt = (1/hstar + 2*e*alpha(2)/hstar[+1]^2)^.5 ; st = 1/hstar-alpha(2)/hstar[+1]^2*(e[+1]^2-hstar[+1]) ; v = e * st / rt^2 ; rsq = rt^2 $ REGRESS ; Lhs = v ; Rhs = X ; WTS = rsq $ MATRIX ; beta = b0 & b ; stat(beta,varb) $