Hello,
I have a data file that contains activities done during certain times (for the purpose of this forum I am making up examples). Let's say , individual 1 made dinner from 0 - 29 minutes and then from watched TV from minute 29 - 78 (start times and endtimes recorded as hh:mm:ss and every activity is a new row). There are no gaps in the recording of activities. In a second dataset, I collected other things the individuals did (let's say, discussing politics). These activities were recorded in an identical format but there are gaps.
I would now like to merge the dataset so that I know if the individual was preparing dinner or watching TV when discussing politics. I am hoping for a new variable that would say "TV" in case the individual was watching TV when discussing politics or "dinner" if preparing dinner. One issue is that it is possible, the person was first preparing dinner and then watching TV while having a long discussion about politics. Or in other words, the activities from dataset 2 are mostly, but not always, nested in the activities from dataset 1.
I hope this makes sense and any help is appreciated!
Related Posts with Merging datasets based on recorded time
command to calculate average growth rate with 5 years interval?I have a panel dataset and need to take the lag of the total population with a 5-year interval so th…
How can I count the rows with specific description of a variable per firm and put 0 otherwise?I am new with stata and I would like to know how I can create two new columns that count how many me…
Identify new ID in a group of observationsHi, I have a tricky problem where I have a quarterly panel of observations for parent entities that…
Combinations/LikelihoodsHello, I am trying to create combinations of two variables for each observation of varA and each ob…
Repeated Time values ErrorI am trying to set up a panel structure for my data on houses and schools across a 10 year period. T…
Subscribe to:
Post Comments (Atom)
0 Response to Merging datasets based on recorded time
Post a Comment