Dear Stata Users

My data is in a panel format at the daily frequency (id, date). I run time-series regression for each firm (id). I obtain beta coefficients b_X1; b_X2; b_X3 and corresponding t-stats t_X1, t_X2, t_X3 for each out of 1121 firms (id).

I need to calculate the mean beta coefficient.I use the following code:

Code:
collapse (mean) b_X1; b_X2; b_X3
Beside mean betas I also need to calculate:
1. Percent of positive beta coefficients for each coefficient (out of 1121)
2. Percent of positive and significant beta coefficients for each coefficient (out of 1121; p<0.1)
3. Percent of negative and significant beta coefficients for each coefficient (out of 1121; p<0.1)


How do I alter the code so that I can count three of the above?

Thank you.