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
How to reduce the size of large data files in Stata?I have a dataset on "effects of marijuana on mental health" and it has 9 lac observations. Now I ass…
Rolling Regression with 24-60 months of observationsHi Everyone, I am trying to estimate rolling betas by using the past 24-60 months of data. I requir…
Interaction Effect versus Sub-Group AnalysisHello, I have a basic modelling question related to an analysis I am running using STATA. I do real…
identify data pattern.Dear All, The question is from here (in Chinese). Suppose the data set is Code: * Example generated…
Export results for Markov-switching ARGood afternoon, I'm doing a few Markov-switching AR models and needed to store the results, prefera…
Subscribe to:
Post Comments (Atom)
0 Response to Subtracting date
Post a Comment