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
Help with time-dependent variable in longitudinal dataHi everyone, I am working on panel data as shown below: I want to generate a time-dependent covar…
how to count the distribution of industry in the sampleHi, I would like to have an overview of the industry distribution in my sample to see which industr…
Panel Data Question I could not find in any bookHi All, I have read several manuals on panel data econometrics but I never found the answer to thes…
Random sampleHello to all, I try to learn stata by myself as a economist, So I want to make a boucle to make a r…
clustered standard error with IVDear all I am estimating IV model. I would like to cluster at the village level We have only two vi…
Subscribe to:
Post Comments (Atom)
0 Response to Create consecutive days with unequal number of obs per day
Post a Comment