I'm looking for code to classify participants with depression using more complicated diagnostic criteria than I've used before with STATA.
The scale is the 9-item PHQ 9. Each item (phq_1 through phq_9) has a value of 0 - 3.
I need to identify participants based on meeting the following criteria:
Major Depression: phq_1 or phq_2 of at least 2 AND at least five items phq_1 through phq_9 of at least 2. (But if phq_9 is 1 or higher, it counts towards the five items).
Other Depression: phq_1 or phq_2 of at least 2 AND two, three, or four items phq_1 - phq_9 of at least 2. (Again, if phq_9 is 1 or higher, it counts towards the two, three or four items).
I would really appreciate tips or code on how to express these criteria. I'm stuck at:
gen mds = .
replace mds = 1 if
Thank you for any suggestions.
Related Posts with code for classifying participants based on complex criteria on a 9-item scale
Collapse (mean) and data orderingHi statalist, I'm working with a data set that resembles the following: ID Income 1 50 1 40 1 20 2…
parsing with variant length strings; overcoming ustrregexra greedinessI'm currently trying to parse text from string variables like this: Code: * Example generated by …
LSDV, problem with dummy variables and significanceHello, my data: panel data, 260 observations; 20 Regions and time period: 2004 to 2016. I have fou…
Storing results with a large loop (>11000)I am trying to store results across a large loop. I have previously done as follows but am limited t…
How to Identify Individuals who have moved in and out of a certain state(say poor to good Health) after calculating the transition MatrixHello guys! May I ask your assistance on how can I identify the individuals who have moved in and o…
Subscribe to:
Post Comments (Atom)
0 Response to code for classifying participants based on complex criteria on a 9-item scale
Post a Comment