Hi, I have a problem with a regression I try to run. I did an estimation of the market model with daily data. You can see to output below:
/> summary(regression_resn) Time series regression with "ts" data: Start = -150, End = -26 Call: dynlm(formula = ror_resn ~ ror_spi_resn) Residuals: Min 1Q Median 3Q Max -0.0255690 -0.0030378 0.0002787 0.0039887 0.0257857 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.0003084 0.0007220 -0.427 0.670 ror_spi_resn 0.0363940 0.0706150 0.515 0.607 Residual standard error: 0.008016 on 123 degrees of freedom Multiple R-squared: 0.002155, Adjusted R-squared: -0.005958 F-statistic: 0.2656 on 1 and 123 DF, p-value: 0.6072 / I did several tests for assessing the quality of the estimation (like breusch-pagan, breusch-godfrey, chow-breakpoint, arch lm tests). The model has now clearly a problem with autocorrelation as you can see in de images below: http://r.789695.n4.nabble.com/file/n4631336/resid_resn.png http://r.789695.n4.nabble.com/file/n4631336/pacf_resid_resn.png To take into account the problem of autocorrelation, I did a gls estimation with an AR(1) process and get the following output: /> summary(gls(ror_resn~ror_spi_resn, correlation=corARMA(p=1), method="ML")) Generalized least squares fit by maximum likelihood Model: ror_resn ~ ror_spi_resn Data: NULL AIC BIC logLik -859.0308 -847.7176 433.5154 Correlation Structure: AR(1) Formula: ~1 Parameter estimate(s): Phi -0.3182399 Coefficients: Value Std.Error t-value p-value (Intercept) -0.00034277 0.00052344 -0.6548430 0.5138 ror_spi_resn 0.04337265 0.06741179 0.6433986 0.5212 Correlation: (Intr) ror_spi_resn -0.159 Standardized residuals: Min Q1 Med Q3 Max -3.21202187 -0.38283220 0.03863226 0.50313857 3.24224614 Residual standard error: 0.007953852 Degrees of freedom: 125 total; 123 residual/ I plot acf and pacf again to assess the changes in autocorrelation. But interestingly, there is no change in the plots, they are equal to the images above... Can anyone give advice on how to handle this problem? There is the possibility that I am clearly on the wrong path. I am still a beginner in using R. Furthermore, I did the same procedure with EVIEWS (also implementing AR(1) process) and the model gives different results for the coefficients and error terms. Regards Andi /Output EVIEWS: Dependent Variable: ROR_RESN Method: Least Squares Date: 05/25/12 Time: 17:17 Sample (adjusted): 2 125 Included observations: 124 after adjustments Convergence achieved after 7 iterations Variable Coefficient Std. Error t-Statistic Prob. C -0.000409 0.000525 -0.779074 0.4375 ROR_SPI_RESN 0.052996 0.067794 0.781716 0.4359 AR(1) -0.314260 0.085592 -3.671586 0.0004 R-squared 0.104144 Mean dependent var -0.000365 Adjusted R-squared 0.089337 S.D. dependent var 0.007945 S.E. of regression 0.007581 Akaike info criterion -6.902354 Sum squared resid 0.006955 Schwarz criterion -6.834122 Log likelihood 430.9460 Hannan-Quinn criter. -6.874637 F-statistic 7.033211 Durbin-Watson stat 2.070520 Prob(F-statistic) 0.001289 Inverted AR Roots -.31 / -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-Autocorrelation-and-GLS-Regression-tp4631336.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.