Hi all,
I have panel data with an identifier(ID) and a time variable(mofd, monthly). Based on a characteristic of the IDs, I have formed 10 portfolios. That means that each ID is sorted into a portfolio (1 to 10), every month. Now I am trying to find out how many IDs there are on average in the portfolios. Because the portfolios are formed every single month, in month T there might be 20 IDs in portfolio 1, and 22 in portfolio 2 (etc), but in month T+1 we might have 30 IDs in portfolio 1. So I am trying to find out how many there are on average in each portfolio.
I have heard about ssc unique and distinct, but both of these will only show me the number of distinct IDs per portfolio. I however want to repeat this exercise per portfolio per month, and then simply report the average.
Any ideas?
Thanks,
Erik
Related Posts with Number of IDs per group
How to compare two datasetsHi, I want to verify / confirm that two datasets are identical. I reproduced my dataset from my coll…
Is there a way to get ey/ex marginal effects after xtreg command with fixed effects?Hello all, I would like to see the proportional marginal effects (i.e.: ey/ex) after a regression w…
Inclusion of interaction terms and interpretation of margins output in RE xtprobitHi all, I am conducting a study into the transmission of time preferences in spouses through their …
extract table from multiple pages of the web by Stata ?Hi , I'm now trying to extract data from web " https://ift.tt/2HE5woy" , there are a lot of pages in…
Binary Variable GraphHello all, I simply want to plot a graph with the number of times a binary variable (civil war inci…
Subscribe to:
Post Comments (Atom)
0 Response to Number of IDs per group
Post a Comment