Dear all,

this is my first post and first of all, I must say, thank you all for providing so much information and help. Without this forum, I would not be where I am.

For the following question I have not been able to find a solution:
I am replicating a paper of Kim & Shin (2017) and as one of their last analyses they do a time-series analysis, defined as a firm-specific regression for each of the firms.
It will consider about 40 firms and 6 - 7 firm-years each.
The idea is to receive mean and median values as well as a standard deviation and Z-statistics for each coefficient.

1. The way I found to receive the means and median was to do a regression for each company and its firm-years with the help of statsby.
As a result, I received all coefficients and the Adjusted R² (as well as standard errors and degrees of freedom) for each regression.

2. As a next step I built the mean and median values as well as the mean standard deviation for the coefficients.

3. The t-statistics I received by deviding the coefficient by its standard error:
HTML Code:
tmdev=b_mdev/se_mdev
Then I calculated the Z-statistics with the help of the formula the authors provided:
HTML Code:
gen sum = (tmdev/(sqrt(m_df/(m_df-2))))
drop if sum==.
sum gvkey
display sum(sum)
display ((1/sqrt(_N))*sum(sum)) // Z-statistics
display 2*(1-normal(abs(((1/sqrt(_N))*sum(sum))))) // p-value for Z-statistics
Unfortunately, the Z-statistics I receive are very far from what the authors report. But let's assume they are right.

4. Now, I want to find out about the significance level of the median of the coefficients based on the Wilcoxon signed rank test. As far as I can see the Wilcoxon signed rank test is only valid for two groups (treatments) and not for 30.
Does anyone know how to overcome this problem?

Thank you for all of your help (concerning what I did and what I am looking for).

Best regards,
Francesca