Dear all,
I have a sample of panel data which contains data on a main firm: cik, a given year: year and the corresponding number of peer firms to a main firm:peercik (for each cik).
I would like to generate summary statistics (mean, median, minimum, maximum, st dev and N) for each year (my sample goes from 2006-2016).
However, I have to rearrange my data to find data I need: the mean, median, min, max, st dev, number of peers per cik per year.
I've tried the following:
sort year cik peercik
replace peercik=1
by year cik: egen npeer_cik=sum(peercik) if _n==1
However this does not work. Can anyone help me to find the average peercik statistics per year?
Best regards,
Patrick
Related Posts with Summary statistics per cik per year
How to test pro-poorness of growth if the sample size in two surveys are not equalHi, I would like to test pro-poorness of growth. In the example “Testing for pro-poorness of growth …
How to find the day of the weekHi everyone, I have a clinical intervention data with adverse events. I want to see if adverse event…
Meaning of the Oaxaca_rif result?Thank you for your answer. The following results were obtained using oaxaca_rif. ------------------…
HOW to solve the Hedging strategy return on investment?From 2009 to 2015, we bought companies with a median investment greater than or equal to TMFO1 based…
Meta analyse with STATA 15Hi, I have some problem with my new version of STATA 15, of course in the old versions it was very e…
Subscribe to:
Post Comments (Atom)
0 Response to Summary statistics per cik per year
Post a Comment