Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tutorial: Homework Assignment Purposes: Use Excel Load and embed SPC Macro into Excel Create Histograms from Data Sets Create Control Charts for Various.

Similar presentations


Presentation on theme: "Tutorial: Homework Assignment Purposes: Use Excel Load and embed SPC Macro into Excel Create Histograms from Data Sets Create Control Charts for Various."— Presentation transcript:

1 Tutorial: Homework Assignment Purposes: Use Excel Load and embed SPC Macro into Excel Create Histograms from Data Sets Create Control Charts for Various Data Types Create Histograms and Control Charts on your “Own” QI Project Data Mac Excel 2011

2 Test Dataset Contents: File 1 = Number of pneumonia patients per week File 2 = Number of non-deaths between deaths File 3 = Red Bead Game (# red beads out of 100) - 500 draws File 4 = Length of stay by delivery type (C-section or vaginal) File 5 = Breast Cancer Screening Homework Files Mac Excel 20112

3 Data Types Attribute (Categorical) Data: Nominal: “Named” Categories (Ex. Male/Female). Binary: Exactly Two Categories. Ordinal: Ordered name categories (Ex. Low/Medium/High). Numeric Data: Interval: Numbers without fixed zero scale. These can’t form meaningful ratios (Ex. Temperature). Ratio: Numbers that can form meaningful ratios (Ex. Blood Pressure). Continuous: can take on any numeric value (e.g. cost, weight). Discrete: meaningful only at discrete values (e.g. # of children). Mac Excel 20113

4 Choosing an SPC Chart (Decision Tree) Additional information can be found in Measuring Quality Improvement in Health Care (Carey & Lloyd, pg. 72). Attribute Data Type Numeric Discrete Continuous (# of per) Constant Subgroup (# of per) Variable Subgroup (# of between) Rare Event n >1 n=1 Normal Distribution n=1 Don’t Recognize Distribution c Chart u Chart g Chart x, s x XmR n Constant or Varies np < 15 c Chart p Chart Control Chart Subgroup p Size n Mac Excel 2011 4

5 Access Macro and Data Sets The datasets are found on the session cd in a folder labeled: “Excel Homework Files”. *If you do not copy the files, you may still view them from the cd, but if any changes are made and you wish to save them, you will have to do so in a folder on your own computer. It is easiest to copy these files to your own computer*. To do this: 1.Select all the files (Drag to highlight, hold down control). 2.Two finger click, select “Copy”. 3.Paste the files in a new folder, or on your desktop (Double click, “Paste”). Mac Excel 20115 1 2 3

6 Load Macro into Excel 1.Open Excel (spreadsheet should be blank). 2.Click the “Open Workbook” button. 1.Find the folder where the macro is saved. 2.If you cannot see the file, make sure Enable is set to “All Readable Documents”. 3.Select “SPC Macros Addin rev 1.12.4.Xlam”. 4.Select “Open”. *If prompted with a security notice be sure to select “Enable Macros”. 1 2 3 4 Mac Excel 20116

7 Open Data Sets 1.To open the homework data sets (spreadsheets), click the “Open Workbook” button. 2.Find where you have saved the data sets and Select “File 1 – pneumonia patients per week.xlsx”. 3.Press the “Open” button. 1 2 3 Mac Excel 20117

8 Create Distribution with SPC Macro In file 1 – pneumonia patients per week.xlsx, select the data in column B (Tip: If you select the first cell in the column and then press Command + Shift + Down Arrow Keys together, Excel will select all data in the column until it arrives at a blank cell). 1.Select SPC Macros in the Task Bar (If you do not see the macro, you may have to load it again – slide 6). 2.Select “Identify Distribution”. 3.If you highlighted the first row that contains labels, check “Check if the first row contains labels”. 4.Select “Recalc” to generate the distribution. 5.Click “OK” to Save the data. v 1 2 3 4 5 Mac Excel 20118

9 Distribution and Residuals The tab that the SPC Macro generates should look something like this The data is saved upon pressing “OK” in the Identify Distribution Window. “Cancel” erases the new tab. Mac Excel 20119

10 Create Table for Control Chart 1.Highlight the # pneumonia patients per week (Column B) in the dataset. 2.Click on the SPC Macro in the Task bar. 3.Select the appropriate chart (file 1 = c-chart because: # of per, ratio discrete, variable subgroup). 1 2 Select and open Homework file #1. If necessary, re-load SPC Macro (slide 6). Determine the distribution that matches your dataset (slides 3-4). Mac Excel 201110 3

11 Complete Fields to Generate Table 1.Complete the fields in the c-chart box in the “Input Data”. 2.Only check “Check if the first row contains labels” if you have included the label in the highlighted material. 3.Enter the “Significance Level”, α, as desired (0.01 or 0.05). 4.Select “OK” to generate the table. *The macro will populate a new sheet that looks like this. Mac Excel 201111 1 2 3 4

12 c = count c-bar = average count LCL = lower confidence limit UCL = upper confidence limit Create Control Chart After highlighting the data: 2.Select the “Charts” tab. 3.Click the “Line” button (Second from the left). 4.In the dropdown menu, select “Line”. 1.Select variables to be graphed on control chart: ` Tip: Select cell B6 and while holding left mouse key, move cursor to E6 and release left mouse key. Use hint from tutorial 1 (shift + Command + down arrow key) to select and move to the bottom of the data range. 1 2 3 Mac Excel 201112

13 To change the lines : 1.Click the Chart Layout tab (If you do not see the Chart Layout Tab, click anywhere on the graph). 2.Select the line series from the Current Selection. Edit Control Chart Format 1 2 3 Mac Excel 201113

14 Edit Control Chart Format (cont’d) On the Chart Layout tab, select Format Selection. Mac Excel 201114 A dotted red line without markers is a convention that is widely used for the LCL and UCL.

15 Edit Control Chart Format (cont’d) 1.Select “Line” in the Format Data Series box. 2.Check if the Solid tab is selected. 3.Click the arrow on the Color field and select red (You may receive a warning about complex formatting, select OK). 4.Click the “Weights & Arrows” tab. 5.Select the Style of 2.25. 6.Select the rounded dots Dashed type. 7.Click the “OK” button and the line on your graph will be updated. 1 2 3 4 5 6 7 *Repeat steps on slides 8-10 to change the LCL to a dotted red line. Mac Excel 201115

16 To add titles to the chart and to the axes: Click anywhere on the chart. Under Chart Layout, select “Chart Title”. Select “Title Above Chart” in the dropdown menu. Type in title. Axis titles can be added by clicking the button adjacent to “Chart Title”. Click on the Legend button, select “Legend at bottom”. Label and Finish Chart *Files 2, 3, 4 and 5 require additional/altered steps based on chart type* Mac Excel 2011 16

17 Additional Steps for file 2 – nondeaths between deaths.xlsx **File 2 is similar to File 1, but a g-chart is used. 1.Highlight “Nondeaths Between Deaths” data in Column B. 2.Click on the “SPC Macros” button in the Task Bar. 3.Select “g-chart” in the dropdown menu. 4.In the g-chart window, enter a significance level (0.01). 5.Click “OK”. 1 2 3 *If needed 4 5 Mac Excel 201117

18 **Follow pages 12-16 to create and edit control chart** Additional Steps for file 2 – nondeaths between deaths.xlsx Mac Excel 201118

19 Additional Steps for file3 – Red Bead Game.xlsx 1.Select the data in Column B (Command + Shift + Down). 2.Then select the appropriate control chart option in the SPC Marco on the Task bar (p-chart). 3.After clicking in the field “Select the sample size range,” select data in Column C. 4.Fill in the Significance Level. 5.Select OK to create the table in a new sheet. 1 2 3 4 5 Mac Excel 201119

20 Creating Control Chart for file3 – Red Bead Game.xlsx 1.To create a Control Chart, follow steps on slide 12. 2.To format the Control Chart, follow steps on slides 13-16. Before Formatting After Formatting Mac Excel 201120

21 Final P-Chart for file3.xlsx Mac Excel 201121

22 Open “file 4 – length of stay by delivery type.xlsx”. The file contains data on two types of procedures (C-sections and Vaginal) that are identified in column “Type”. We will organize the data according to delivery type and then separate them into 2 different data sets. Sort and Separate file 4 – length of stay by delivery type.xlsx 1.Highlight data in Columns A-F. 2.Under the “Data” tab, find the “Sort” button. 3.On the right side of the “Sort” button, click the Arrow to show the dropdown menu. 4.Select “Custom Sort” in the dropdown menu. 5.If headers are highlighted, check “My list has headers”. 6.Next to “Sort by”, select “Type” in the dropdown menu. 7.Click “OK”. 1 2 3 4 5 6 7 Mac Excel 2011 22

23 1.Once you have sorted by delivery type, cut and paste separate data into two separate columns, one for each delivery type. – Find where the type changes from “C- section” to “Vaginal”. – Hightlight the second group (Columns A- F) for “Vaginal” type. Sort and Separate file 4 – length of stay by delivery type.xlsx 2.Create a x-bar s chart on each type of delivery using the LOS_HRS Column. Mac Excel 2011 23

24 1.Highlight the LOS_HRS column for one delivery type (Column D for C-section). 2.Click on “SPC Macros” in the Task Bar. 3.Select “x-bar s” chart in the dropdown menu. Mac Excel 201124 Sort and Separate file 4 – length of stay by delivery type.xlsx To create a x-bar s chart: 1 2 3

25 4.Now click in the 2 nd box and highlight the DSCHRG_MNTH column (Column C for C-section). 5.If you highlighted labels, click on “Check if the first row contains labels”. 6.Enter a Significance Level” (0.01). 7.Click “OK”. 8.Repeat steps on slides 23-24 with the 2 nd delivery type (Vaginal). Mac Excel 201125 Sort and Separate file 4 – length of stay by delivery type.xlsx To create a x-bar s chart continued: 4 5 6 7

26 Mac Excel 201126 Sort and Separate file 4 – length of stay by delivery type.xlsx After creating the x-bar s run charts, use data in columns D-G of both delivery types to create a control chart (slides 12- 16). C-section Vaginal

27 Mac Excel 201127 Sort and Separate file 4 – length of stay by delivery type.xlsx The finished control charts look like the following: C-section Vaginal

28 Additional Steps for file5 – Breast Cancer Screening.xlsx For this file we are going to treat it as if an intervention occurred beginning January 1, 2014. 1.Highlight data (Tip: Command + Shift + Down). 2.To create a Pivot Table, Click on the Data tab. 3.Select the Pivot Table button (Third from the left). 1 2 We will first create a Pivot Table: Mac Excel 2011 28

29 To populate the “Drop Value Fields”: 1.Under Field name, hold and drag “Year” and then “Month” into the “Row Labels” below. 2.Then drag “Screening Done” into the “Column Labels”. Finally drag “ID” to “Values”. 1 2 Additional Steps for file5 – Breast Cancer Screening.xlsx *The new worksheet will initially look like the above image. Mac Excel 201129

30 1.Under “Values” you will now see “Sum of ID.” Click the next to it. 2.Select “Count” in the Summarize by field and click “OK”. 3.Now under “Values”, you will see “Count of ID.” 1 2 3 Additional Steps for file5 – Breast Cancer Screening.xlsx Mac Excel 201130

31 1.Now highlight the values that correspond with 2013 (pre-Intervention) and 1 for screening done. This will be column C cells 6 - 17. 2.On the Task bar, click SPC Macro and select the p-chart. Additional Steps for file5 – Breast Cancer Screening.xlsx 1 2 Mac Excel 201131

32 1.Now click into the 2 nd box and then highlight column D “Grand Total”, rows 6 - 17 for the sample size. 2.Skip to the bottom where you will enter a significance level, use 0.01. 3.Select “OK” at the bottom of the Macro screen and a new P- Chart Table will appear in a new sheet. Additional Steps for file5 – Breast Cancer Screening.xlsx 1 2 3 Mac Excel 201132

33 1.Return to the worksheet with the Pivot Table. 2.Repeat the steps from slides 11-12 for creating a p-chart, but using only 2014 data (Post Intervention), this will be Column B, 19-24. 3.Using the same significance level that you used for the 2013 data (.01). 4.This will create another smaller p-chart table. Additional Steps for file5 – Breast Cancer Screening.xlsx 2 1 3 4 Mac Excel 201133

34 Now copy all of the data from the 2014 p-chart table (excluding headers) and paste it below the data from p-chart table 1 (2013 data), which is located on another tab. Additional Steps for file5 – Breast Cancer Screening.xlsx Mac Excel 201134

35 1.You may wish to enter the actual Year and Month values where it says Group. 2.Highlight the data in the p-bar, p-hat, LCL and UCL Columns. 3.Cut and Insert highlighted Columns next to the Group Column. Additional Steps for file5 – Breast Cancer Screening.xlsx 1 2 3 Mac Excel 201135

36 Finally, create a SPC chart as you did in previous steps (see slide 15-19). You will see the change from Pre to Post Intervention highlighted with different averages and control limits. Additional Steps for file5 – Breast Cancer Screening.xlsx Mac Excel 201136

37 Embed Macro into Excel (optional) If you wish to use the macro again at a later time, you will have to repeat the steps on slide 6 each time Excel is opened. If you would like to embed the macro in Excel so it loads automatically each time Excel is opened, follow the steps in slides 37-39. 1.Click on Tools in the Task bar. 2.Select Add-Ins in the Tool bar menu. 1 2 Mac Excel 201137

38 Embed Macro into Excel (cont’d) 3.Click the “Select” button in the Add-Ins window. 4.Locate where you have saved the macro, select it. 5.Click the “Open” button. 3 4 5 Mac Excel 201138

39 Embed Macro into Excel (cont’d) 6.Make sure the “SPC Macros AddIn rev.1.12.4.Xlam” box checked. 6.Click “OK”. 6 7 Mac Excel 201139

40 Create Histograms and Distribution Using Your “Own” QI Project Data 1. Determine what data element(s) you will need in order to show any changes to the process you are focusing on. 2. Create a dataset or work with someone at your organization that can help you access data for your QI project. 3.Create histograms from data sets. 4.Write brief statement on graph about data “findings”. Mac Excel 2011


Download ppt "Tutorial: Homework Assignment Purposes: Use Excel Load and embed SPC Macro into Excel Create Histograms from Data Sets Create Control Charts for Various."

Similar presentations


Ads by Google