Hi,
It may be a relatively simple problem to order dates, but I cannot find an elegant solution.
I have the dates of several events. The events can occur in any order.
I would like to identify for each observation, the order of each event, and report event_1 1st n,%, event_1 2nd n,%, event_1 3rd n,%....., event_2 1st n,%, event_2 2nd n,%, ….. etc.
My solution is clumsy, loop by each observation, to identify event position in the sequence of events, 1st,2nd, 3rd etc.
Thank you,
Horia
Related Posts with Group by order of event occurrence
ESTTAB command for BiprobitHello everyone, I am vary familiar with using esttab with ols, however I was wondering is there a w…
how to keep variable x1,y1,z1 when rank =1 and keep x2,y2,z2 when rank=2 for different idsThose with same id numbers are categorized into ranks and I want to keep percentage1 com11 pet1 when…
Mixed Effects Models - include cases without key independent variable?Hello, I am learning about mixed-effects models and have a question. I am analyzing within-individua…
Delete an observation if the value of a string variable is contained in another variable.I want to delete any obervation where the value of input1 is same as that of input_toremove. I saw …
How to format the same regressors differently for different models using Stata estout?I know that we can format different regressors (the rows of a estout table) of the same model using …
Subscribe to:
Post Comments (Atom)
0 Response to Group by order of event occurrence
Post a Comment