4
$\begingroup$

I need to repeat in R results of a fully-modified OLS estimation that I got in Eviews. Here is the Eviews estimation (updated):

CointReg in Eviews

My code in R using the cointReg package is:

library(cointReg)
y  <- ts(c(35.8, 41.6, 35.9, 36.9, 42.43, 36.067,28.67, 29.53, 32.83, 
           9.867,23.9, 20.8, 21.167),start=c(2000,1),frequency=4)
x1 <- ts(c(149.67,108.89, 89.067, 83.33, 77.2,64.91, 50.2, 48, 
           62.13,52.93,43.2, 38.8, 37.9),start=c(2000,1),frequency=4)
x2 <- ts(c(435,675,1033,1180,1293,1380, 1478, 
           1580,1710,1800,1865,1920,1997),start=c(2000,1),frequency=4)

cointRegFM(x=cbind(x1[2:13], x2[2:13]), y=y[2:13], bandwidth=3.00, kernel="ba", 
           inter=TRUE, deter=NULL, demeaning=TRUE)

And R output:

### FM-OLS model ###

Model:      y[2:13] ~ cbind(x1[2:13], x2[2:13])

Parameters: Kernel = "ba"  //  Bandwidth = 3 ("set by user")

Coefficients:
                             Estimate   Std.Err t value Pr(|t|>0)    
cbind(x1[2:13], x2[2:13])   0.4088079 0.0451151  9.0614 3.892e-06 
cbind(x1[2:13], x2[2:13]).1 0.0040926 0.0017326  2.3621   0.03981

As you see, the estimation results are quite different. As far as I understand the problem is in some estimation technics that are used by these programs. Do you have any suggestions how to correct the R code and get the same results (or at least similar)?

P.S. I set the bandwidth equal to 3 manually because somehow the Newey West automatic bandwidth gives different results in Eviews and R.

$\endgroup$
  • $\begingroup$ Are you sure you are using the same data? EViews mentions mean dependent var of 31, R gives mean(y[2:13])=29. Also, you might want to dig deeper into the output of cointRegFM(), like comparing the $omega.u.v, which should correspond to that in Eviews? $\endgroup$ – Matifou Nov 29 '16 at 6:33
  • $\begingroup$ @Matifou, thank you. There indeed was a mistake, I corrected it but it changed really nothing. Still results are different. Also I tried all components of cointRegFM() but there is very luttle information. Long-run variances are different as well. By the way, the difference in coefficients in this example is not so great but in my real-life model results differ quite much. Can't figure out how to get similar ouput in both programs... $\endgroup$ – Katin Nov 30 '16 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.