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
Creating age-range variableHello! I would like to create a new age-range variable, which will be a breakdown of already existin…
random number generationusing stata 13 I have set a seed value and using gen random=runiform() generated random numbers. Whe…
need equal spaces for unequal time points in x-axis of graphI'm trying to create a line graph showing trends in religiosity across five waves of survey data (2,…
Displaying symbols in value labelsHi, is there a way to display math symbols like "greater than or equal to" as value labels and have …
Test for a trend of bacterial resistance against antibiotics over ten years periodDear statalist, Unfortunately, I posted this question one week on cross-validated and have yet to g…
Subscribe to:
Post Comments (Atom)
0 Response to Subtracting date
Post a Comment