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
Nested Logit - Coefficient InterpretationHi All, How do we interpret the results from a Nested Logit model? Taking the example that Stata u…
Industry sigma codeIndustry sigma is the mean of standard deviations of cash flow over assets over 20 years, for firms …
ways to restrict data to certain wavesIn addition to using the command "if wave=certain number," is there another way to restrict data to …
Graphing svy tabulation results including 95% confidence intervalsHello all, I frequently find that I want to produce line graphs of times series of categorical vari…
number of observationin my data I get different number of observation, how I make the number of observation same ? Arra…
Subscribe to:
Post Comments (Atom)
0 Response to Create consecutive days with unequal number of obs per day
Post a Comment