Hello Community,
I hope someone can help me out with my Stata problem.
Basically, I would like to subtract two points in time form one another (insterTime - startTime), using an identifier variable (ID) as well as several conditions (received Message = 1 and Typ).
Here is an excerpt from my data:
Array
I thought something along the following lines could work, but I simply do not know enough about coding in Stata:
{(itemInster if Typ == Hotel) – (ItemStart – 5 days if Typ == Flug)} if recivedHotelMissing ==1 & id match
Ideally, Stata would give me something like this:
Array
Thank you in advance
Related Posts with Calculation across cells using an identifier variable
Comparing one binary variable to anotherI have data from a survey on two questions (Yes or no answers). I want to test the hypothesis that "…
Spearmon's correlation coefficient and significance on plotHello! Interested in displaying the correlation coefficient and significance on a plot; using follow…
Import Paneldata - DatastreamHi guys, I am currently sitting on an issue which I do not understand quite frankly. I used the tut…
Analysis with subgroups cut by dependant variableDear stata users, I would like to examine the influence of different determinants on the price of re…
Fix value of a variable in Panel DataHey! Unfortunately I could not find any answers to my question in previous posts. I am working wit…
Subscribe to:
Post Comments (Atom)
0 Response to Calculation across cells using an identifier variable
Post a Comment