Dear Stata folks,
I have a dataset with patient_ids, days and a measurement(outcome). Patients may have more than one measurements per day. The number is unequal between patients and days. Let's say that it is the BP measurements.
The days are in %td format but not consecutive, since some patients may non have measured their BP a day and then measure it the next days. Patients are advised to do these measurements for 28 days but some did it for less and few others did so for more.
I want to create a consecutive day variable so as to have 0 measurements when they have not measured their BP, instead of having only the measurements for the days that they did measure.
Any help please? Whatever I saw in different posts doesn't work for my case.
Thank you in advance.
Related Posts with Create consecutive days with unequal number of obs per day
Number format which does not add zeros to natural numbersI want Stata to show decimals only for numbers which are not natural. For instance - I want the numb…
Handling duplicatesHello, This is my first post here and I am generally new to Stata, but I'll try to formulate my con…
Rename after reshape long to wideHi, I changed the data format from long to wide (variable 'binary') and the data is in form: Code…
Date formatHello, In the dataset, the date is in format : Code: 2015 - 07 - 01 00:00:00 2016 - 01 - 01 00:00…
Stata 16: Is it not possible to have BOTH the 'Variables' and 'History' windows be visible?It's a minor inconvenience--and perhaps I'll get used to it--but I still like how earlier versions o…
Subscribe to:
Post Comments (Atom)
0 Response to Create consecutive days with unequal number of obs per day
Post a Comment