I am starting in the world of Stata and I would appreciate suggestions on how to approach the following. (Stata 14.2 IC for Mac)
I have a dataset with aprox. 60 numeric variables (pres_visit1 through pres_visit60) of pressure readings during consecutive visits to the doctor for about 500 patients. The dataset looks like this (resumed version):
pres_visit1 | pres_visit2 | pres_visit4 | pres_visit5 | pres_visit6 | pres_visit7 | |
patient1 | 12 | 13 | 9 | 9 | 11 | 12 |
patient2 | 19 | 16 | 18 | 19 | 15 | 14 |
patient3 | 21 | 20 | 15 | 16 | 19 | 18 |
patient4 | 21 | 22 | 22 | 20 | 24 | . |
patient5 | 12 | 13 | 11 | . | . | . |
patient6 | 19 | 15 | 17 | 18 | 20 | . |
In other words, I need to evaluate for each patient, the first variable with a value of "≥17" and only if this is met, then determine if the immediate next variable is also "≥17" and repeat this until it finds the first pair of such qualifying values.
I greatly appreciate your time and knowledge,
Alan Kastner.
0 Response to Identifying consecutive observations that meet a determined value
Post a Comment