Dear Statalist,
I am currently trying to regress the following dataset (Period 5 years) to understand if the price of good G has an impact on the stock S of the good in a company's balance sheet:
-Weekly data of the price of good P
-Annual data of the stock of good P for a company S (balance sheet figure)
Hence, being very simplistic, the dataset could be composed of three columns being the calendar week W, the Price G and the stock in the year S (which of course is the same for each year)
The following code reveals a cubic relationship:
reg S P
acprplot P, lowess
Hence, I tried to regress with the following code:
gen P2 = P^2
gen P3 = P^3
reg S P P2 P3
predict error, residual
kdensity error, normal
But here I am now at the problem of the title, when testing the normal distribution of the error term, it is not normally distributed, but bimodal distributed.
I have noticed, that this is caused by the structure of the values for S.
When S used as reported, there is no problem, however when removing the growth aspect (rationale being, that the stock will also be influenced by the companies growth, creating a factor that must be removed) creates two groups of values (€21m, €22m, €23m and €29m, €29m, €29m).
Unfortunately, I do not understand how to handle this problem, since I believe that the growth factor must be removed, but the normality assumption is violated when doing so.
I am looking forward to your help!
Thanks in advance!
I am currently trying to regress the following dataset (Period 5 years) to understand if the price of good G has an impact on the stock S of the good in a company's balance sheet:
-Weekly data of the price of good P
-Annual data of the stock of good P for a company S (balance sheet figure)
Hence, being very simplistic, the dataset could be composed of three columns being the calendar week W, the Price G and the stock in the year S (which of course is the same for each year)
W | P | S |
1 | 200 | 21 |
2 | 210 | 21 |
... | ||
52 | 205 | 21 |
1 | 220 | 22 |
2 | 215 | 22 |
The following code reveals a cubic relationship:
reg S P
acprplot P, lowess
Hence, I tried to regress with the following code:
gen P2 = P^2
gen P3 = P^3
reg S P P2 P3
predict error, residual
kdensity error, normal
But here I am now at the problem of the title, when testing the normal distribution of the error term, it is not normally distributed, but bimodal distributed.
I have noticed, that this is caused by the structure of the values for S.
When S used as reported, there is no problem, however when removing the growth aspect (rationale being, that the stock will also be influenced by the companies growth, creating a factor that must be removed) creates two groups of values (€21m, €22m, €23m and €29m, €29m, €29m).
Unfortunately, I do not understand how to handle this problem, since I believe that the growth factor must be removed, but the normality assumption is violated when doing so.
I am looking forward to your help!
Thanks in advance!
Comment