This is a test for a post I am considering.
I am a dermatologist with an interest in phototherapy. Two different phototherapies are PUVA and UVB. One disease these are used for is psoriasis. I would like to see how people with psoriasis who have had a previous course of UVB which did not result in clearance fared with subsequent PUVA. I have looked out data on about 25000 whole-body courses of UVB and PUVA for psoriasis in the region of Scotland where I work. I attach a very small portion of this data (changing the patient identity numbers to make certain of complete anonymity.
What I would like to generate from this dataset is a dataset only of patients who have had UVB then PUVA with no clearance with UVB so I can then summarise outcomes for subsequent PUVA. For people who have more than once received UVB then PUVA I want to just take their first UVB then PUVA. I have tried starting to change the dataset so it is ordered by patient not course, but with different variable heading for course 1, course 2 (if applicable), course 3 (if applicable, course 4 (if applicable), etc, but am struggling with this.
I am hoping that this is relatively straightforward for those who have done similar manipulations to data in Stata before, but have not found an answer in Statalist / Archive / standard documentation. I should be grateful for any help.
I am a dermatologist with an interest in phototherapy. Two different phototherapies are PUVA and UVB. One disease these are used for is psoriasis. I would like to see how people with psoriasis who have had a previous course of UVB which did not result in clearance fared with subsequent PUVA. I have looked out data on about 25000 whole-body courses of UVB and PUVA for psoriasis in the region of Scotland where I work. I attach a very small portion of this data (changing the patient identity numbers to make certain of complete anonymity.
What I would like to generate from this dataset is a dataset only of patients who have had UVB then PUVA with no clearance with UVB so I can then summarise outcomes for subsequent PUVA. For people who have more than once received UVB then PUVA I want to just take their first UVB then PUVA. I have tried starting to change the dataset so it is ordered by patient not course, but with different variable heading for course 1, course 2 (if applicable), course 3 (if applicable, course 4 (if applicable), etc, but am struggling with this.
I am hoping that this is relatively straightforward for those who have done similar manipulations to data in Stata before, but have not found an answer in Statalist / Archive / standard documentation. I should be grateful for any help.