Instructions for carrying out statistical procedures and tests using SPSS

Instructions for carrying out statistical procedures and tests using SPSS These instructions are closely linked to the author’s book: Essential Stati...
Author: Emory Goodwin
2 downloads 2 Views 237KB Size
Instructions for carrying out statistical procedures and tests using SPSS These instructions are closely linked to the author’s book:

Essential Statistics for the Pharmaceutical Sciences John Wiley & Sons Ltd http://eu.wiley.com For all references to chapters or tables, see the above book.

Creating and modifying graphs in SPSS

Chapter 2 – Preparing figures in SPSS The files referred to are available from the web site associated with this book www.ljmu.ac.uk/pbs/rowestats/.

Preparing Fig 2.1 1. Obtain initial graph Open the XL file ‘Data for Figure 2.1’ Set up an SPSS data sheet to hold the data. Cut and paste the data into SPSS. Follow the menus Graphs / Legacy Dialogs / Bar … Click on Simple and then Define Move the variable Preferred into the ‘Category Axis:’ box Click OK 2. Change background and foreground colours Double click anywhere on the bar chart, to open the Chart Editor Double click anywhere on the grey background of the figure Click the Fill & Border tab Click on White. Click Apply (The grey background should disappear) Double click any one of the four bars Click the Fill & Border tab Click on White. Click the down arrow below Pattern and select the diagonal stripes (Third from left on top row). Click Apply 3. Change the width of the bars Click the ‘Bar Options’ tab Move the slider control labelled ‘Bars’ to reduce the bar width from 75 to 60 Click Apply 4. Change font sizes Double click on any of the letters (A,B,C or D) along the horizontal axis Click the Text Style tab Change ‘Preferred Size’ to 12. Change Style to Bold. Click Apply Double click on any number on the vertical axis, change the font to 12 Bold and click Apply. Change the font of the vertical and horizontal labels (Count and Preferred) to size 12 and Apply. Close the Properties and Chart Editor windows. You can copy and paste the figure into Word documents etc.

Preparing Fig 2.2 The files referred to are available from the web site associated with this book www.ljmu.ac.uk/pbs/rowestats/. Open the XL file ‘Data for Figure 2.2’ then proceed essentially as for Fig 2.1. Additionally – remove the horizontal label Click on the horizontal label (Opinion), then click on the label again, highlight all the text and press .

Return to main menu

Preparing Fig 2.3 The files referred to are available from the web site associated with this book www.ljmu.ac.uk/pbs/rowestats/. Open the XL file ‘Data for Figure 2.3’ Set up an SPSS data sheet to hold the data. Cut and paste the data into SPSS. 1. Obtain initial graph Follow the menus Graphs / Legacy Dialogs / 3-D Bar … Click Define Move Opinion into the box labelled ‘X Category Axis’ and Colour into ‘Z Category Axis’ Click OK. (Initial graph will not look much like the finished article.) 2. Change the order of the bars Double click anywhere on the figure to open the Chart Editor window Double click on any bar Click the Categories tab Click Dangerous and then use the up arrow to promote Dangerous to the top of the list Click Powerful and promote it to second Continue this process until the order is Dangerous, Powerful, Neutral, Safe and Calming Click Apply 3. Change the size of the bars Click the Bar Options tab Move the slider control labelled Bars down to 30 to reduce the size of the bars and Apply. 4. Change background and foreground colours Double click on the background well away from the actual figure Click on the Fill and Border tab Click on White and Apply. (Background to the figure will, turn white). Double click on one of the bars Click the Fill & Border tab and click on White. Click the down arrow below Pattern and select the diagonal stripes (Third from left on top row). Apply There are three grey panels that form a background to the figure (Left and right behind the bars and a base underneath). Double click on any one of these. Click on the Fill and Border tab Click on transparent (White with red diagonal) and Apply. Do the same for the other two grey panels.

5. Remove labels Click on the label (Opinion) on the horizontal axis, click again, highlight all the text and press Do the same for the Colour label. 6. Increase the size of the figure Double click on any bar. Click on the 3-D Elements tab Change the slider control labelled Distance to read 60 and Apply 7. Increase text sizes Click on one of the labels Dangerous, Powerful etc Click on the Text Style tab Change Preferred Size: to 14 Apply Do the same for the labels Red and Green Click on one of the numbers on the vertical axis and change the Preferred Size to 10 and Style to Bold and Apply. Close the Properties window and the Chart Editor Note that the figure contains grey shading that (apparently) cannot be removed. For this reason, a hand drawn version of Figure 2.3 is used in the book.

Return to main menu

Preparing Fig 2.4 The files referred to are available from the web site associated with this book www.ljmu.ac.uk/pbs/rowestats/. Open the XL file ‘Data for Fig 2.4’ Set up an SPSS data sheet to hold the data. Cut and paste the data into SPSS. 1. Obtain initial graph Follow the menus Graphs / Legacy Dialogs / Bar … Click Stacked and then Define. Move Drug_used into the box labelled ‘Category Axis:’ and Nausea into ‘Define Stacks by:’ Click OK. 2. Re-order the bars and nausea grades Double click anywhere on the figure to open the Chart Editor. Double click on one of the horizontal labels such as ‘Candidate 1’. Click the Categories tab. Highlight Current and use the up arrow controller to promote it to the top of the list and Apply. This will re-arrange the bars. Double click on one of the labels such as ‘None’ or ‘Slight’. Click the Categories tab. Re-arrange the categories to the order Severe, Moderate, Slight, None and then Apply. This will place None at the bottom of the figure and Severe at the top.

3. Change colours Double click anywhere on the light grey background behind the bars, select White and Apply. Double click on one of the bars. In the key to the figure, click on the small purple square next to the label ‘None’. Click the Fill & Border tab. Select White and Apply. Click on the yellow/grey square next to ‘Slight’. Select the colour white. Under ‘Pattern’, click the down arrow to display the various patterns that are available and select the lightly dotted pattern (Left of second row) and Apply. Click the green square for ‘Moderate’. Select White and the more heavily dotted pattern (Left of third row) and Apply. Click the blue square for ‘Severe’. Select Black and Apply.

4. Change fonts Click on one of the labels ‘Severe’ or ‘Moderate’ etc. Click the Text Style tab. Change Preferred Size: to 12 and under Style: select Bold. Apply. Click on the label ‘Nausea and change the font to 12 Bold as above and Apply. Click on one of the horizontal labels such as ‘Current’ and change the font to 12 Bold and Apply. Click on one of the numbers on the vertical axis and change the font to 10 Bold and Apply. 5. Remove unwanted label Click on the label Drug_used, click again, highlight all the text and press . Close the Properties window and the Chart Editor.

Return to main menu

Preparing Fig 2.5 The files referred to are available from the web site associated with this book www.ljmu.ac.uk/pbs/rowestats/. Open the XL file ‘Data for Figure 2.5’ Set up an SPSS data sheet to hold the data. Cut and paste the data into SPSS. 1. Obtain initial graph Follow the menus Graphs / Legacy Dialogs / Histogram … Move Temp into the Variable: box. OK. 2. Change binning Double click the figure to open the Chart Editor. Double click any bar. Click the Binning tab. Under X axis, select Custom and then ‘Interval width’ and set width to 0.3 Apply. (Each bar now represents a temperature range of 0.3°C). 3. Colours Double click the grey background, select White and Apply. Double click any bar. Select White and then for Pattern click the down arrow and select diagonal stripes (3rd from left on top row). Apply. 4. Mean and SD These are not very informative as the data is bimodal. Click on ‘Mean = 37.76’ and press . 5. Fonts Double click on one of the numbers on the vertical scale. Set Preferred Size: to12 and set Style: to Bold. Apply. Do the same for the vertical label (Frequency), the horizontal axis numbers and the horizontal label (Temp). Close the Properties window and the Chart Editor.

Return to main menu

Preparing Fig 2.6 The files referred to are available from the web site associated with this book www.ljmu.ac.uk/pbs/rowestats/. Open the XL file ‘Data for Figure 2.6and7’ Set up an SPSS data sheet to hold the data for 2005 only. Cut and paste the 2005 data into SPSS. 1. Obtain initial graph Follow the menus Graphs / Legacy Dialogs / Pie … Click Define. Move ‘Statins_2005’ into the box labelled ‘Define Slices by:’ Click OK. 2. Change the colours of the slices Double click anywhere on the figure to open the Chart Editor. Double click on any of the slices and then click on the blue slice for Atorvastatin. Select white and Apply. Click on the green slice for Fluvastatin and select white. Click the down arrow for Pattern and select the light dotted pattern (Left of second row) and Apply. Click on the grey/yellow slice for Lovastatin and set it to white with a diagonally striped pattern (Third from left on top row) and Apply. Set the purple Pravastatin slice to white with a heavy dotted pattern (Left of third row) Set the yellow Rosuvastatin slice to white with diagonal striped pattern (Third from left on second row) Set the red Simvastatin slice to black (no pattern). 3. Change fonts and remove labels Double click one of the labels such as ‘Simvastatin’. Click the Text Style tab. Change Preferred Size: to 16. Click the label ‘2005’, click again, highlight all the text and press . Close the Properties window and the Chart Editor. Repeat all above for Statins_2006 The two SPSS figures are then copied and pasted into PowerPoint where extra labels are added and one of the existing keys is covered by a white square.

Return to main menu

Preparing Figure 2.7 Start with the two figures created for Figure 2.6. Double click to open the Chart Editor. Click on any slice. Click on the Simvastatin slice. Click on Elements in the menu bar and then on Explode Slice Completed figure is then assembled in PowerPoint as for Figure 2.6

Return to main menu

Preparing Figure 2.8 The files referred to are available from the web site associated with this book www.ljmu.ac.uk/pbs/rowestats/. Open the XL file ‘Data for Figure 2.8’ Set up an SPSS data sheet to hold the data. Cut and paste the data into SPSS. 1. Obtain initial graph Follow the menus Graphs / Legacy Dialogs / Scatter/Dot … Click Simple Scatter and then Define. Move Clearance into the Y Axis: box. Move Weight into the X Axis: box. OK. 2. Change background colour Double click the figure to open the Chart Editor. Double click the grey background of the figure. Select White and Apply. 3. Change the size of the circle symbols Double click on one of the circle symbols on the graph. Change Size from 5 to 8 and Apply. 4. Change fonts Double click on one of the numbers along the horizontal axis. Change Preferred size: to 12 and set Style: to Bold. Apply. Do the same for the vertical axis label (Clearance), the numbers along the horizontal axis and the horizontal label (Weight). Close the Properties window and the Chart Editor.

Return to main menu

Preparing Figure 2.10 The files referred to are available from the web site associated with this book www.ljmu.ac.uk/pbs/rowestats/. Open the XL file ‘Data for Figure 2.10’. Set up an SPSS data sheet to hold the data. Cut and paste the data into SPSS. This is then done exactly as for Figure 2.8 with additional steps … 5. Make symbols solid black circles Click on the white square next to the label ‘Fill’. Select Black and Apply. 6. Add comment boxes The figure is copied into PowerPoint and the additional comment boxes are added.

Return to main menu

Preparing Figures 2.11 and 2.12 The files referred to are available from the web site associated with this book www.ljmu.ac.uk/pbs/rowestats/. Open the XL file ‘Data for Figure 2.11&12’ Set up an SPSS data sheet to hold the data. Cut and paste the data into SPSS. We will first create Figure 2.12 and then convert it to Figure 2.11. 1. Obtain initial graph Follow the menus Graphs / Legacy Dialogs / Line … Click Simple. Under ‘Data in Chart Area’, click ‘Summaries for groups of cases’. Click Define. Under ‘Line Represents’, click ‘Other statistic (e.g., mean)’. Move Recovery into the Variable box. Move Year into the Category Axis: box. OK. 2. Change background colour Double click anywhere on the figure to open the Chart Editor. Double click on the grey background, select White and Apply. 3. Edit vertical label Double click on the vertical label (Mean Recovery) and then single click it. Edit to remove ‘Mean’. 4. Adjust fonts Double click any number on the vertical axis and change Preferred Size: to 12 and change Style to Bold. Do the same for the vertical label (Recovery), the horizontal numbers and the horizontal label (Year). 5. Increase weight of line Double click on the graph line and change Weight to 2.0 and Apply. Copy and paste figure into PowerPoint and add text boxes. Figure 2.12 is now complete. 6. Convert to Figure 2.11 … Starting with Figure 2.12, double click to open the Chart Editor. Double click on the numbers on the vertical axis. Click the Scale tab.

For Minimum, uncheck Auto and set Custom value to zero. For maximum, uncheck Auto and set Custom value to 80. Apply. Copy and paste into PowerPoint and add text boxes.

Return to main menu

Preparing Figure 2.13 The files referred to are available from the web site associated with this book www.ljmu.ac.uk/pbs/rowestats/. Open XL file ‘Data for Figure 2.13’. Set up an SPSS data sheet to hold the data. Cut and paste the data into SPSS. Proceed as for Figure 2. 12.

Return to main menu