Suggested answers to exercise: Outcome of the MRC streptomycin trial, 2

Question 2: Create a new variable which represents alive or dead.

Suggested answer

We can do this using Recode. We choose Transform, Recode, Into different variables. Choose the variable 'Radiological assessment' into Input variable .

I decided to call my new variable 'survival' and give it the values 1 for survived and 2 for died. Click the Output variable Name box and type 'survival'. Click the Output variable Label box and type 'Survival'.

Click Old and New Values. First we will recode 1 to 5, the radiological assessments for the living, to 1. Click Range. Type '1' in the first box and '5' in the through box. Now type '1' in the New Value Value box. Click Add to put this recoding into the Old --> New box. You should see '1 thru 5 --> 1' there. (We must forgive them 'thru', they are Americans.)

Now we recode 6, meaning died, in the old variable to 1 in the new. Click Old Value Value. Type '6' in the box. Now type '2' in the New Value Value box. Click Add to put this recoding into the Old --> New box. You should see '6 --> 2' there.

Click Continue, click Change, click OK. Your new variable will appear on the Data View spreadsheet.

It would be a good idea to add value labels, so we do not forget what the codes mean. Go to Variable View. For the new variable, click the values box, which should say 'None', and click the little grey square. Type 1 into the Value box and 'Survived' into the Label box. Click Add. Repeat for 2 and 'Died'. Click OK.

You can check that all is well by cross-tabulating 'Radiological assessment' by 'Survival' to get:

Radiological assessment * Survival Crosstabulation
Count
Survival Total
Survived Died
Radiological
assessment
Considerable improvement 32 0 32
Moderate/slight improvement 23 0 23
No material change 5 0 5
Moderate/slight deterioration 17 0 17
Considerable deterioration 12 0 12
Death 0 18 18
Total 89 18 107


Back to Exercise: Outcome of the MRC streptomycin trial.

To Applied Biostatistics index.

To Martin Bland's M.Sc. index.

To Martin Bland's home page.

This page maintained by Martin Bland.
Last updated: 15 November, 2006.

Back to top.