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
Winsorization of VariableDear All I want to ask a doubt which may sound very trivial, but I am unable to take a call. Suppose…
Latent Class Model on a Mixture-Amount Discrete Choice ExperimentHello I performed a discrete choice experiment which included 8 mixtures terms (the proportions of …
Program for cross validation for regression discontinuity in time not runningDear All, To estimate a regression discontinuity in time model I want to use cross validation to de…
How to set up and run stcox stratified survival analyses on a limited time of the entire followup.Hi, I would like to study the effect of a heritable exposure (gene mutation) on two outcomes (a and…
Interaction Term Interpretation - Continuous*Categorical in Log-Linear OLSHi! I have a continuous log-transformed health expenditure variable, and an interaction term of weig…
Subscribe to:
Post Comments (Atom)
0 Response to Counting number of specific observations per group
Post a Comment