I encountered a problem while I was studying SAS programming for clinical trials. I will just paste the problem here: " Using dataset DOSES, create a report showing all patients who changed dose during the study, and their actual dose at each visit. In this report indicate the extent of dose adjustment by creating a variable called DOSEADJ which takes the values N (normal) if dose remains the same as at visit 1 R (reduced) if the dose is less than the previous dose P (remains reduced) if the dose is the same as the previous dose, but the previous dose was reduced compared with visit 1 For example, patients 1 & 6 would appear in the report as below, but patients 4 & 5 would not be reported. Note PATIENT uniquely identifies the patient. PATIENT VISIT ACTLDOSE DOSEADJ 1 1 32 N 2 32 N 3 16 R 4 16 P 5 16 P 6 1 32 N 2 16 R 3 4 R " Suppose the raw data is just like the first three columns of the data shown above, how exactly can I generate the fourth column (DOSEADJ)? as required? I thought of using 'retain' and 'first.patient' etc, but have not been able to produce the code which can do the job. Thanks!
... View more