Dear all,
I have a panel datatset of 74 countries with multiple daily observations. I have also four events A, B, C and D as dummy variables.
Array
As you can see from the Table, an event may occur multiple times per one date (ex: event A in 3/17/2020). Also, multiple events may occur in one time (e.g., event B, A and C in 3/19/2020).
I would like to merge these multiple observations in order to have just one observation per date with all occuring events. For example, for 3/19/2020 event A, 1; event B, 1; event C, 1; event D, 0. For 3/17/2020, event A, 1; event B, 0; event C, 0; event D, 0
Thank you in advance!
Jon.
Related Posts with Merging multiple observations per time in panel data.
Creating event time variableHi, I have a time series of stock returns with multiple event date indicators, such as the following…
Coding_column_rowDear statalist community, I am in need to do the following exercise for my research, can anyone plea…
Adding multiple labels to regsaveI am saving coefficients using regsave (from ssc) and I am able to use the 'addlabel' option to add …
the `tebounds’ command - bound the average treatment effectHi Statalists, I am reaching out with some questions regarding the `tebounds’ command. I am wonderi…
Poisson regression without specifying exit variableI am conducting an analysis using a longitudinal dataset from an ongoing cohort that spans over 5.5 …
Subscribe to:
Post Comments (Atom)
0 Response to Merging multiple observations per time in panel data.
Post a Comment