Hello,

my dataset consists of the following variables: id (fund id), date (year month), hret (historical return), nstocks (number of stocks) and top_bottom. top_bottom groups the funds into the top 20% and bottom 20% regarding their hret for each observed date.

Now I want to create a table showing the mean regarding hret and nstocks for "top" and "bottom". Furthermore, I also want to see if the difference between both groups is statistically significant (at 10%, 5% and 1% level). However, I could not fully figure out how to do that.

For now my code looks like this. I figured this is best done by using -estpost- and -esttab-. The table's first column displays the mean for the "top" group (mu_2), the second column the mean for the "bottom" group (mu_1) and the third column displays the difference (b). Column four shows the t-statistic (t).
Code:
estpost ttest hret nstocks, by(top_bottom)
esttab, cells("mu_2 mu_1 b t")
However, I do not know how to assign a level of significance (10%, 5% and 1%) to the third column, to see if the difference is statistically significant or not. Furthermore, right now the difference is calculated by substracting "hret(bottom) - hret(top)". But I do want it to be the other way around, meaning "hret(top) - hret(bottom).

Does anyone know how to solve that problem?

Thank you very much for your help!