M. M. Palhoto N. Rodrigues
2004-Jan-14 12:00 UTC
[R] How can I test if a not independently and not identicallydistributed time series residuals' are uncorrelated ?
I'm analizing the Argentina stock market (merv) I download the data from yahoo library(tseries) Argentina <- get.hist.quote(instrument="^MERV","1996-10-08","2003-11-03", quote="Close") merv <- na.remove(log(Argentina)) I made the Augmented Dickey-Fuller test to analyse if merv have unit root: adf.test(merv,k=13) Dickey-Fuller = -1.4645, p-value = 0.805, merv have unit root than diff(merv,1) is stationary. Than I made Breushch-Pagan test to test if residuals are identically distributed: library(lmtest) bptest(merv[2:1730]~-1+merv[1:1729],~merv[1:1729]+I(merv[1:1729])^2) BP = 81.3443, df = 2, p-value = < 2.2e-16 So merv.reg$resid aren't identically distributed. Than merv is heteroscedastik. Finally I made Box-Ljung test to test if residuals are independently distributed: (H0: merv.reg$resid are independently distributed) library(ts) merv.reg <- lm(merv[2:1730]~-1+merv[1:1729]) Box.test(merv.reg$resid, lag=25,type="Ljung") X-squared = 54.339, df = 25, p-value = 0.0006004 So, there is evidence to REGECT (mistake in laste e-mail) the null hypothesis, than the residuals are NOT independently distributed. Because the residuals are not independently distributed, we know that the squares of residuals are correlated: cov[(residuals_t)^2, (residuals_(t-k))^2] <> 0 (not zero for k <> 0) But, the residuals could be uncorrelated, (even when they are not independent distributed): cov[residuals_t, residual_(t-k)]=0 ! How can I test that merv.reg$residuals are uncorrelated ? Thanks a lot. [[alternative HTML version deleted]]
Apparently Analagous Threads
- How can I test if a not independently and not identically distributed time series residuals' are uncorrelated ?
- How can I test if time series residuals' are uncorrelated ?
- how to specify uncorrelated random effects in nlme::lme()
- Uncorrelated random vectors
- Lame question about cp