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
Modulo, Mathematics, and Stata NotationFor a simulation, there's an equation that (in part) takes the form of 0.3.(t mod(T + 1))−(t mod(10…
Practicum due soon/autocorrelation unbalanced panel data: xtreg, cluster, xtregar, xtpcse??Hi all! I am struggling a bit to figure out which is the best command to use for OLS on unbalanced …
Extreme Bounds AnalysisHi, I want to do Extreme bound analysis (EBA) suggested by Sala-i-Martin (1997). I have checked help…
Creating categorical variables for hypertensionHello, I am trying to complete a homework assignment for a coding class where I have to "use bpsyst…
Stratified Wilcoxon Mann Whitney Generalised Odds Ratios for Repeated Measures DataDear Statalist, Hope you're all well. I have a dataset with repeated measures of the modified Rank…
Subscribe to:
Post Comments (Atom)
0 Response to Counting number of specific observations per group
Post a Comment