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.