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.
Data stored with information on several individuals in one row. How to make each individual a unique observation?My data come compactly stored with information on several individuals (familymembers) in one row (ca…
Destringing vars and changing commas to dotsHi all I have some datasets in which Italian notation has been used - this means that commas have …
Define frequency distribution avoiding repetition of a variableI have 3 variables: CompanyID RoundNumber (from 1 to 16) RoundNumber_max (from 1 to 16) For each co…
Curious error when listing longI'm working with latitude and longitude variables but I ran into a curious error: Code: clear input…
Find the most recent observationHi, I have a year-firm panel data. How should I write the code to find the most recent observation …
Subscribe to:
Post Comments (Atom)
0 Response to Merging multiple observations per time in panel data.
Post a Comment