I have a task which I couldn't tackle. I have a data set that includes patient's ID and several variables coding patient's outcome performance on different scales before, during and after an intervention. The grade of performance is coded from 0 to 4. Performance outcomes are partially missing for some patients.
I want to build a line chart that shows the change in the percentage of patients that have a performance grade 3 or 4 before, during and after the outcome.
I have a number of difficulties. I think the best way is to make a new data set that contains the percentage of performance grade 3 or 4 for a each test on before, during and after the intervention, but I did not find the right procedure. Such data set will look like this:
Test Before During After
Test1 30% 55% 50%
Test2 20% 43% 38%
The percentage need to be calculated after excluding missing values.