84 Dow Jones Industrial Average DJIA Tables 810 and 811 cont
8.4) Dow Jones Industrial Average (DJIA): Tables 8.10 and 8.11 contain the values of the daily DJIA for all the trading days in 1996. The data can be found at the book's Website. DJIA is a very popular financial index and is meant to reflect the level of stock prices in the New York Stock Exchange. The Index is composed of 30 stocks. The variable Day denotes the trading day of the year. There were 262 trading days in 1996, and as such the variable Day goes from 1 to 262.
(A)Fit a linear regression model connecting DJIA with Day using all 262 trading days in 1996. Is the linear trend model adequate? Examine the residuals for time dependencies.
(B)Regress DJIA(t) against DJIA(t-I), that is, regress DJIA against its own value lagged by one period. Is this an adequate model? Are there any evidences of autocorrelation in the residuals?
(C)The variability (volatility) of the daily DJIA is large, and to accommodate this phenomenon the analysis is carried out on the logarithm of DJIA. Repeat the above exercises using log(DJIA) instead of DJIA. Are your conclusions similar? Do you notice any differences?
Can you show me how to do this in R
The data se can be found here http://www.stat.nus.edu.sg/~zhangjt/teaching/textbook/datasets.htm under chapter 8 DIJA
Solution
Answering how to solve this in R
A)
# for regression
fit=lm(DJIA~Time)
fit
# for details
summary(fit)
(B)Regress DJIA(t) against DJIA(t-I), that is, regress DJIA against its own value lagged by one period. Is this an adequate model? Are there any evidences of autocorrelation in the residuals?
# Regress DJIA(t) against DJIA(t-I)
fit2=lm(DJIA~DJIA[1:261])
acf(fit2) # for autocorrelation
this model is not desiable one. as we are plotting data DJIA(t) against DJIA(t-I)
(C)The variability (volatility) of the daily DJIA is large, and to accommodate this phenomenon the analysis is carried out on the logarithm of DJIA. Repeat the above exercises using log(DJIA) instead of DJIA. Are your conclusions similar? Do you notice any differences?
the conclusion is same as because the logarithm is one to one correspondance with the original data.

