Hello, new to the forum here. I'm a physician with a limited but thus far functional understanding of stata. I'm running into a problem with the following data set.
The overall analysis is looking at the effect of a drug recall on patients receiving a particular eye injection. The time of the recall is defined as t0. Each patient's eye in the data set has a unique code. Each encounter (i.e. office visit) at which time a patient would have received an injection is its own row (detailing the drug received). Therefore, if a patient's eye had multiple injections, then there will be multiple rows with the same code for that eye. For the rows, e-1 is the encounter before t0, e-2 the penultimate before t0, etc. e1, e2, etc are for encounters after t0. I'm having an issue figuring out how to do the analysis below in this nested layout of my data.
What would be the best commands for the following:
- Analyzing how many injections were received by each patient prior to t0
- How many patients switched drug from e-1 to e1 (before and after the recall)
- Categorizing the diagnostic indication for each eye (i.e. not by row but rather by eye).
I have tried searching in the manual and online, but I have hit a will. Hope my questions are clear- if not happy to clarify. Again, I'm primarily a clinical physician.
Appreciate any help.
The overall analysis is looking at the effect of a drug recall on patients receiving a particular eye injection. The time of the recall is defined as t0. Each patient's eye in the data set has a unique code. Each encounter (i.e. office visit) at which time a patient would have received an injection is its own row (detailing the drug received). Therefore, if a patient's eye had multiple injections, then there will be multiple rows with the same code for that eye. For the rows, e-1 is the encounter before t0, e-2 the penultimate before t0, etc. e1, e2, etc are for encounters after t0. I'm having an issue figuring out how to do the analysis below in this nested layout of my data.
What would be the best commands for the following:
- Analyzing how many injections were received by each patient prior to t0
- How many patients switched drug from e-1 to e1 (before and after the recall)
- Categorizing the diagnostic indication for each eye (i.e. not by row but rather by eye).
I have tried searching in the manual and online, but I have hit a will. Hope my questions are clear- if not happy to clarify. Again, I'm primarily a clinical physician.
Appreciate any help.
Comment