Hi.
I have a very long data set where I have a number of observations for each id. In each observation there is a string variable with a procedure text - lets call it "Surgical procedure".
I want to list (display) the 3 most reoccurring "surgical procedures". In other words I want the 3 most frequently performed procedures presented as median.
Example:
id Surgical procedure
1 Procedure A
1 Procedure B
2 Procedure A
2 Procedure C
2 Procedure A
3 Procedure D
3 Procedure B
4 Procedure A
4 Procedure A
4 Procedure A
4 Procedure D
4 Procedure B
4 Procedure C
I hope this is enough info to get som help.
Thanx
Related Posts with How to display the 3 most reoccurring observations in a string variable (presented as median)
Generate a time dummy pre - and post -treatment in panel dataHello everyone, I have a panel dataset covering US states and counties for a number of years and qua…
Plotting a graph of confidence intervals for interaction effectsHi, I have a regression with 3611 observations, over 720 fixed effect variables and 8 interaction t…
View full variable names in the browserIs there a way by which we can see full names of the variables in the data browser, without formatti…
Test and train dataset: evaluate RMSE of my modelsuppose I run the following regression: Code: reghdfe y x1 x2 x3 if train == 1, abs(fe1 fe2) clu…
mergehow to merge two transversal bases of different periods …
Subscribe to:
Post Comments (Atom)
0 Response to How to display the 3 most reoccurring observations in a string variable (presented as median)
Post a Comment