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)
select the first or the last groupDear all, How can I write code more efficiently to select the first group or the last group membersh…
Codes of unit root tests with multiple structural breakHi, I am looking for the Stata code of the Lee & Strazicich unit root test from the following pa…
Estimating marginal effects for interactions in the second hurdle of double hurdle modelsHi there, I am running double hurdle models with data from a multi-round modified dictator game, us…
eventstudy2 longer event windowHello, I am currently working with eventwindow2 and tried to estimate an event period larger than +…
Need help with homework!!!Hey, My professor has asked us to work with stata. However, I have no idea about stata at all, I en…
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