I have a dataset, approximately 7500 observations, where clinicians were requested to enter a treatment plan:
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str66 q10 "upper arch treatment only" "upper arch treatment only,extraction" "upper arch treatment only" "upper and lower arch treatment,extraction" "upper arch treatment only,non-extraction" "upper arch treatment only,extraction" "upper arch treatment only" "upper and lower arch treatment,extraction" "upper and lower arch treatment,extraction,other" "upper arch treatment only" end
I would like to extract specific treatments such as 'upper and lower arch treatment,extraction'. I have used moss (SSC) and regex:
. li if regexm(q10,"upper and lower arch treatment,extraction")
+-------------------------------------------------+
| q10 |
|-------------------------------------------------|
4. | upper and lower arch treatment,extraction |
8. | upper and lower arch treatment,extraction |
9. | upper and lower arch treatment,extraction,other |
+-------------------------------------------------+
I only need results 4 & 8, the real data set has several additional treatments.
How can I find just the 'upper and lower arch treatment,extraction'
Thank you,
Martyn
0 Response to Unique text string
Post a Comment