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
Scatter plot: do I have to choose between (weighted) marker size and marker label ?Hello Stata experts, I would like to make a scatter plot with marker size like in https://www.stata.…
Panel Data Three Dimensions "repeated time values within panel"Hello everyone, First of all, I would like to apologize in advance if I commit any mistake on this …
Threshold regression using time series dataDear Community, I am a user of Stata 15. I am trying to estimate the threshold effects of inflation…
Identifying waitresses who serve as receptionists in other hotels in which hotels have the same two-digit industry codeDeal all, I have the following sample: Code: Year | Staff ID | Hotel_ID | Industry code | Waitress…
Dealing with omitted variable bias in survival analysesHi, I would like to know how I could deal with an omitted variable bias in a survival analysis. My …
Subscribe to:
Post Comments (Atom)
0 Response to Calculation across cells using an identifier variable
Post a Comment