Dear all,
I have a simple problem for which I have not been able to find a solution. Imagine a very simple dataset regarding bank loans with three columns/variables. Variable 1 shows the distinct id variable for each loan in my sample. Variable 2 shows the lenders that were involved in making the loan (there can be multiple lenders per loan). Variable 3 shows the role of each lender for a specific loan (assume there can only be four roles: a,b,c,d).
How can I generate a new variable that shows me the number of banks with role b or c per loan?
Thanks in advance.
Regards, Ali
Related Posts with Counting number of specific observations per group
Icd 10Dear all, I wonder if anyone has any experience working with ICD 10 codes. I have 1 mill records o…
Comparing coefficients from different Event Study specificationsHi all, I aim at estimating the effect of job loss on the labor supply of the spouse using an event…
Adding a line for observations in the -collect- systemHello, I am sure this must be trivial, but I have had no luck with it so far. I am trying the new -…
Concatenating string variables with missing valuesHi all! I've tried to follow the instructions from another post on this forum to concatenate variab…
Merging multiple observations per time in panel data.Dear all, I have a panel datatset of 74 countries with multiple daily observations. I have also fou…
Subscribe to:
Post Comments (Atom)
0 Response to Counting number of specific observations per group
Post a Comment