Reputation: 41
I really need some help
I have to see if there is an effect of holidays, special days, and weather on my daily data. The daily data has clearly a seasonal cycle.
So for this,I am trying to run linear regression with around 1100 observations. The first step was to transformer the number of sells as described in the papers I read.
Rt=Ln(Pt/Pt-1)*100
Where Pt is the the sales of today, and Pt-1 from the previous day
To account for the seasonality, I simply have a first linear regression using the day of the week as dummy variable
fit<- lm(log_return~D1+D3+D4+D5+D6+D7,data=mydata)
which with OLS gives the following result: Model Plot
The residuals are non-normal, Q-Q Plot shows some heavy legs. I think it might be because the Residuals have significant heteroscedacity and autocorrelation.
From the papers I read, the authors always used Standard White and Newey West for correction of heterscedacity and autocorrelation in the residuals. variables, I have both problem making my OLS certainly wrong.
From the sandwich documentation for R, it appears that Newey West can find automaticly the right amount of lags, which is for me great, because I tried several ARMA(p,q) variants without success.
So now I run the vcovHAC(fit), I am not really sure what it is. Does it correct my problem of unknown autocorrelation and heteroscedacity by itself completly also with White SE,and find the necessary lag(s) needed to correct the regression?
How do I apply this then on my regression to get the same summary as summary(fit), but with the corrected values in R, including Rsquared? Does it magicly correct everything ? What are the limits?
Thanks a lot guys
Upvotes: 1
Views: 3639