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
Logistic regression with Effect Modification or Mantel-HaenszelHello. I'm trying to find an association between Sex of child and Exposure to or having a Defect fro…
Forval loop invalid syntaxHello, I am using forval code as below and then it says it is 'invalid syntax'. I checked that all …
What does the keyword `control' at the end a regression command do?Hi everyone, I am trying to replicate a paper to get my self familiar with STATA. I the paper comes…
Reproducing an output including all indicators of a categorial variable and a constantDear Stata-Listers, I am currently trying to reproduce the output in the picture. The model used in…
How to generate monthly time series data based on yearly time series data?Hello, I am wondering how to generate monthly time series data. For example, my current data set is…
Subscribe to:
Post Comments (Atom)
0 Response to Reducing dataset
Post a Comment