MathType

Tuesday, 31 May 2016

Estimation Auto-correlated Error with Stata (Time Series)

Lets begin with the multiple regression model:





Before we regress the data by Stata, first thing we must to do is to set our data into a time series form;

        tsset year,quarterly

      
Now, regress the data based on the model for Eq(3.1)

reg lnM1 lnR lnGDP lnP, robust
estat dwatson



From the D-W table, for N = 40, k =2 and alfa = 0.05;

0    dL = 1.391  dU = 1.600  2  4-dU = 2.4  dL = 2.609  4

Our DW statistics easily fall into rejection region, suggesting positive autocorrelation.




THE TRANSFORMATION OF MODEL

The transformation model require algebra and OLS.

This ease of use one reason for the popularity of the transformation model, especially in the years before other methods were readily available in software package like Stata .

If Eq (1) hold true at time t, it also hold true at time (t -1). Hence;

 Multiplying Eq(2) by p  on both side,


 Substracting Eq(3) fromEq(1);


 Rearrange terms;

 where



The disturbance on this new regression are serially uncorrelated, so least-squares estimates are unbiased and efficient.

Now, lets we apply the transformation model for Eq(6);


reg lnM1 lnR L.lnR lnGDP L.lnGDP lnP L.lnP L.lnM1
estat dwatson


 D-W Table,for N= 39, = 7 and α = 0.05,

dL= 1.104  du = 1.932   2   4- du = 2.068  4- dL = 2.896

The results for DW test show indecision zone.

The constant term in the transformed model is an estimate of  (1-p)b0 .

To get the value of constant term b0 , along with a standard error, t-statistics and p-value;


nlcom _b[_cons]/(1-_b[L.lnM1])




GENERALIZED OR QUASI DIFFERENCE APPROACH

From Eq(7), we can generate another estimation in difference form;


 where


Note that with this differencing procedure we lost one obs.

To avoid this, it is suggested thatall variables should transform for the first obs, as follow;

 To estimate model Eq(7), first we must get the value of  from Eq(1) and we know that;



Now, estimate the Eq(1) and get the value of p by estimating the residual as Eq(9);

reg lnM1 lnR lnGDP lnP
predict e, residual
reg e L.e,nocons
di _b[L.e]




Generate data for first obs;

gen lnM1_star = ((1-_b[L.e]^2)^(0.5))*lnM1 in 1
gen lnR_star = ((1-_b[L.e]^2)^(0.5))*lnR in 1
gen lnGDP_star = ((1-_b[L.e]^2)^(0.5))*lnGDP in 1
gen lnP_star = ((1-_b[L.e]^2)^(0.5))*lnP in 1
gen beta0_star = ((1-_b[L.e]^2)^(0.5)) in 1

Insert data for the rest of obs;

replace lnM1_star = lnM1- _b[L.e]*L.lnM1 in 2/40
replace lnR_star = lnR - _b[L.e]*L.lnR in 2/40
replace lnGDP_star = lnGDP - _b[L.e]*L.lnGDP in 2/40
replace lnP_star = lnP - _b[L.e]*L.lnP in 2/40
replace beta0_star = 1 - _b[L.e] in 2/40

And then estimate the Eq(8);

reg lnM1_star beta0_star lnR_star lnGDP_star lnP_star,nocons
estat dwatson



From the D-W Table,  for N= 40, k = 4 and α = 0.05

dL = 1.336  du = 1.720   2   4- du = 2.280 4- dL = 2.664

The results for DW test show there is no autocorrelation.




THE COCHRANE-ORCUTT ITERATIVE PROCEDURE

Cochrane and Orcutt (1949) developed an iterative procedure that can be presented through the following steps;

Step 1 : Estimate the regression model Eq(1)  and obtain the residual

Step 2: Estimate the first order serial correlation coefficient p by OLS  as in Eq(9)

Step 3: Transform original variables as;


Step 4: Run regression using the transformed variables and find the residuals of this regression. Since we do not know that the  obtained from Step 2 is the ‘best’ estimate of p, go back to Step 2 and repeat Steps 2 to 4 for several rounds until the following stopping rule holds.

Stopping rule: the iterative procedure can be stopped when the estimates of p  from two successive iteration differ by no more than some preselected (very small value), such as 0.001

The final p  is used to get the estimates of Eq(8) .

In general, the iterative procedure converges quickly and does not require more than 3 to 6 iterations

To perform Cochrane-Orcutt for Eq(8);

prais lnM1 lnR lnGDP lnP






From the D-W Table,  for N= 39, k = 3 and α = 0.05

dL= 1.328  du = 1.658   2   4- du = 2.342 4- dL = 2.672

The results for DW test show there is no autocorrelation






















                        

No comments:

Post a Comment