Hi I have a question that I am struggling with: I have three variables of interest that I would like help with. I would like to create a variable that captures the time from when the patient was first transfered to discharge for Med/Surgical unit. Something like:
transfer_datetime transfer_type unit_type
01/15/19 03:05 transfer other
01/17/19 01:20 discharge
01/20/19 12:25 transfer other
admit Med/Surg
transfer Med/Surg
transfer Med/surg
discharge
What I would like is a variable that shows the time between the first transfer and the discharge, for med/surgical unit type only (the discharge has no unit_type because it is discharge), and not for the "other". May you please assist with this?
Related Posts with Subtracting date
Making esttab use factor labelsDear All, I am running a regression with country variable, if I run a normal regression in Stata th…
Reshape LongI want to format my data from this pattern: Company Name Jul-03 Aug-03 Sep-03 Oct-03 Nov-03 Dec-0…
problem with saving plots names in loopHi everyone, The code below generates plots by the levels of profile variable but because the levels…
Different Means in Policy StancesFor a paper project I am looking at whether Evangelicals have different means in their policy stance…
Coefficient, SE and Residuals are same but not the predicted yhatHi, I have noticed that when I run the following, they produce exactly similar results for coeffici…
Subscribe to:
Post Comments (Atom)
0 Response to Subtracting date
Post a Comment