Hello Guys
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 |
..... |
|
|
|
I have a dataset with over 200 different firms. Now i want to have this result:
DayofWeek |
Mean |
St. Dev |
N |
t-value |
1 |
|
|
|
|
2 |
|
|
|
|
3 |
|
|
|
|
4 |
|
|
|
|
5 |
|
|
|
|
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.
Code:
collapse (mean) adjretadd1, by(dayofweek)
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.
Code:
correlate dailyreturns, means cov
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
0 Response to Mean, StDev, N, t-value in one command
Post a Comment