Hi all,
I have made a dataset containing variables like so: (sorry my dataex wont install properly!) cdeath=deathcode mdeath indicates death caused by tb - made this by using strpos if it includes 'tb' in description and correct code from cdeath.
Patid tdeath description deathdate __tbdeath(indicator)
1 ___A1 ____tb ______12/01/1996 __1
1 ___A3 ____non tb ___06/06/1995__ 0
1 ___A3 ____non tb____
2 ___A4
2___ A5
2 ___A6
I am trying to reduce the dataset to 1 row per person , and tb death should equal 1 if they have ANY malaria related death records and 0 if they had no malaria records.
Any help would be greatly appreciated!
Related Posts with Reducing dataset
Replace the first date of the first quarter with the last date of the first quarter for all ids and years.Dear All, I found this question here (https://bbs.pinggu.org/thread-10256921-1-1.html). The data set…
graph twoway: two x-axis, lines and line labellingHi folks - apologies a bit of a beginner with the plotting in Stata, but was wondering if anyone kne…
Plotting an interaction while accounting for another interactionHi everyone, I want to plot the marginal effect of an IV on a DV for different values of my moderat…
how to calculate adult equivalenthi I'm new in stata, and I need some help to resolve my problem I want to calculate expenditure per …
Cluster bootstrap and singleton cluster errorHello, I am trying to run a cluster bootstrap of a user written program: bootstrap, reps(99) cluster…
Subscribe to:
Post Comments (Atom)
0 Response to Reducing dataset
Post a Comment