Hello Guys
I have a dataset which shows the following:
I have a dataset with over 200 different firms. Now i want to have this result:
So im trying to collapse the mean of every monday in one, the mean of every tuesday in one and this for every day of the week.
With this code i managed to get the mean, which i think is correct. But when i now try to get the other ones (StDev, N and t-value), i don't know how i can do it with one command.
With this, i get then the mean of the 5 days in one, but that's not what i wanted. I also get only N of 5, which is also not correct (the problem is that i then take the results i get from my first command and calculate with them, but i want to calculate with the initial dataset). Is there a command with which i get the results i wanted at once?
Thank you very much for every help.
Best,
Anthony
I have a dataset which shows the following:
Firm | date | return | DayofWeek |
AARGKB | January 3, 2008 | -0.001 | 4 |
AARGKB | January 4, 2008 | -0.007 | 5 |
AARGKB | January 7, 2008 | -0.013 | 1 |
AARGKB | January 8, 2008 | -0.0121 | 2 |
..... |
DayofWeek | Mean | St. Dev | N | t-value |
1 | ||||
2 | ||||
3 | ||||
4 | ||||
5 |
Code:
collapse (mean) adjretadd1, by(dayofweek)
Code:
correlate dailyreturns, means cov
Thank you very much for every help.
Best,
Anthony
Comment