1. welcome...

12
Art of Stat Handout 2020-21 Handout 01 Introduction … Art of Stat/Art of Stat Handout Fall 2020 – Introduction.docx Page 1 of 12 Introduction to Art of Stat 2020-21 Introduction www.artofstat.com Table of Contents Page 1. Welcome ……………………………………………….…..…………………………………….. 2 2. Illustration: Describe a Sample of Categorical Data……...…………………….…………… 4 3. Illustration: Describe a Sample of Continuous Data …….………………………………….. 11

Upload: others

Post on 26-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1. Welcome ……………………………………………….…..…………………………………….. 2biep540w/pdf/Art of Stat Handout Fall 20… · Art of Stat/Art

Art of Stat Handout 2020-21 Handout 01 Introduction

… Art of Stat/Art of Stat Handout Fall 2020 – Introduction.docx Page 1 of 12

Introduction to Art of Stat 2020-21

Introduction

www.artofstat.com

Table of Contents

Page 1. Welcome ……………………………………………….…..……………………………………..

2

2. Illustration: Describe a Sample of Categorical Data……...…………………….……………

4

3. Illustration: Describe a Sample of Continuous Data …….…………………………………..

11

Page 2: 1. Welcome ……………………………………………….…..…………………………………….. 2biep540w/pdf/Art of Stat Handout Fall 20… · Art of Stat/Art

Art of Stat Handout 2020-21 Handout 01 Introduction

… Art of Stat/Art of Stat Handout Fall 2020 – Introduction.docx Page 2 of 12

1. Welcome www.artofstat.com is a nice “go to” for the newcomer to biostatistics who might not be quite ready to jump into a statistical software package, much less doing one’s own programming! This site was developed and continues to be maintained by authors Agresti A, Franklin C, and Klingenberg B who authored an excellent introductory statistics text:

Agresti A, Franklin C, and Klingenberg B. Statistics: The Art and Science of Learning From Data, 4th Edition 2017 Pearson ISBN 13: 9780321997838

How to Launch. From your favorite browser, launch www.artofstat.com From the welcome page, at left, click anywhere inside the large icon titled, Web Apps

Page 3: 1. Welcome ……………………………………………….…..…………………………………….. 2biep540w/pdf/Art of Stat Handout Fall 20… · Art of Stat/Art

Art of Stat Handout 2020-21 Handout 01 Introduction

… Art of Stat/Art of Stat Handout Fall 2020 – Introduction.docx Page 3 of 12

Look around Clicking on Web Apps brings you to a directory of several apps. They are organized into categories and many are useful in BIOSTATS 540:

- Good for producing summary statistics and some basic graphs (BIOSTATS 540 Units 1 and 2)

- Good for simple linear regression (BIOSTATS 540 Unit 12)

- Good for confidence intervals and p-values (BIOSTATS 540 Units 8, 9, and 10)

- Exactly. (BIOSTATS 540 Units 1, 5, and 7)

- Exactly. (BIOSTATS 540 Units 8 and 9

- Exactly. (BIOSTATS 540 Units 8 and 10)

- Good for the Fisher Exact Test. (BIOSTATS 540 Unit 11)

Page 4: 1. Welcome ……………………………………………….…..…………………………………….. 2biep540w/pdf/Art of Stat Handout Fall 20… · Art of Stat/Art

Art of Stat Handout 2020-21 Handout 01 Introduction

… Art of Stat/Art of Stat Handout Fall 2020 – Introduction.docx Page 4 of 12

2. Illustration Describe a Sample of Categorical Data

Example – Question #1 of the Unit 2 (Data Visualization) Homework Data Entry Method: Direct entry of frequency table (“by hand”) The World Health Organization (WHO) records the annual number of confirmed cases of human Avian Influenza A/(H5N1). Following are a subset of their data: Year: 2003 2004 2005 2006 2007 2008 # cases: 4 32 43 79 59 26 In this illustration, there are two (2) variables.

year: This is a nominal variable with 6 levels = 2003, 2004, 2005, 2006, 2007, 2008 cases: This is the associated number of confirmed cases of influenza in that year)

GOAL: Produce a description of the distribution of cases over time (year). The description is to include a frequency/relative frequency table and a bar graph. Step 1 – Launch Art of Stat www.artofstat.com > Web Apps > EXPLORE CATEGORICAL DATA You should see:

Key: Art of Stat is showing you the frequency/relative frequency table and associated bar graph for one of its own data sets. You can enter your own.

Page 5: 1. Welcome ……………………………………………….…..…………………………………….. 2biep540w/pdf/Art of Stat Handout Fall 20… · Art of Stat/Art

Art of Stat Handout 2020-21 Handout 01 Introduction

… Art of Stat/Art of Stat Handout Fall 2020 – Introduction.docx Page 5 of 12

Step 2 – Replace the dataset shown with your own data. At the upper left, from the dialogue boxes and drop-down menus, make the following selections/inputs: Enter Data: Frequency Table Number of Categories: 6 Name of Variable: Year You should now see an empty Art of Stat analysis, waiting for you to enter your data

After entering your data, Art of Stat returns the following

Page 6: 1. Welcome ……………………………………………….…..…………………………………….. 2biep540w/pdf/Art of Stat Handout Fall 20… · Art of Stat/Art

Art of Stat Handout 2020-21 Handout 01 Introduction

… Art of Stat/Art of Stat Handout Fall 2020 – Introduction.docx Page 6 of 12

Have some fun with the options at left

Page 7: 1. Welcome ……………………………………………….…..…………………………………….. 2biep540w/pdf/Art of Stat Handout Fall 20… · Art of Stat/Art

Art of Stat Handout 2020-21 Handout 01 Introduction

… Art of Stat/Art of Stat Handout Fall 2020 – Introduction.docx Page 7 of 12

Example – Unit 1 (Summarizing Data), page 40 Data Entry Method: From Excel – Paste of individual observations Recall. This is a study of n=25 consecutive patients entering the general medical/surgical intensive care unit at a large urban hospital. One of the variables measured was ICU_TYPE, which is a nominal variable indicating the type of ICU admission. Recall how it was coded:

1 = medical 2 = surgical 3 = cardiac 4 = other

These data have been put into an excel file for you called icu_540.xlsx. In this excel file ICU_TYPE is stored in a column labeled icu_type

GOAL: Produce a description of the distribution of the types of ICU admissions in this sample.

Page 8: 1. Welcome ……………………………………………….…..…………………………………….. 2biep540w/pdf/Art of Stat Handout Fall 20… · Art of Stat/Art

Art of Stat Handout 2020-21 Handout 01 Introduction

… Art of Stat/Art of Stat Handout Fall 2020 – Introduction.docx Page 8 of 12

Step 1 – In Excel Open icu_540.xlsx. Minimize Excel. Do NOT exit Excel. Step 2 – Launch Art of Stat www.artofstat.com > Web Apps > EXPLORE CATEGORICAL DATA Step 3 – Replace the dataset shown with your own data. At the upper left, from the dialogue boxes and drop-down menus, make the following selections/inputs: Enter Data: Individual Observations Name of Variable:: Type of ICU Enter categorical observations, separated by a space. Or, simply copy and paste values from a column in your spreadsheet: See Step 4 below …

Step 4 – COPY/PASTE from Excel into Art of Stat In this illustration we copy/paste the column of Excel data corresponding to icu_type

No, no, no!!!!! This is not what we wanted!!!!! … The horizontal shows the codings (1, 2, 3, 4) instead of their names. Worse, they’re not in the right order.

Page 9: 1. Welcome ……………………………………………….…..…………………………………….. 2biep540w/pdf/Art of Stat Handout Fall 20… · Art of Stat/Art

Art of Stat Handout 2020-21 Handout 01 Introduction

… Art of Stat/Art of Stat Handout Fall 2020 – Introduction.docx Page 9 of 12

Step 5 – In Excel, create a column of individual outcomes stored as names __ Copy the column of icu_type into a new “sheet”. __ Select the entire column. Then FORMAT CELLS > TEXT __ Position cursor in cell A:1 __ Use EDIT > FIND > REPLACE ALL to convert 1 à medical __ Use EDIT > FIND > REPLACE ALL to convert 2 à surgical __ Use EDIT > FIND > REPLACE ALL to convert 3 à cardiac __ Use EDIT > FIND > REPLACE ALL to convert 4 à other Your new excel sheet should look like the following:

Page 10: 1. Welcome ……………………………………………….…..…………………………………….. 2biep540w/pdf/Art of Stat Handout Fall 20… · Art of Stat/Art

Art of Stat Handout 2020-21 Handout 01 Introduction

… Art of Stat/Art of Stat Handout Fall 2020 – Introduction.docx Page 10 of 12

Step 6 – COPY/PASTE your newly created data from Excel into Art of Stat Be sure to begin with row 2!!! You don’t want to copy/paste the variable name in row 1 That’s better

Again, have some fun with the options at left

Page 11: 1. Welcome ……………………………………………….…..…………………………………….. 2biep540w/pdf/Art of Stat Handout Fall 20… · Art of Stat/Art

Art of Stat Handout 2020-21 Handout 01 Introduction

… Art of Stat/Art of Stat Handout Fall 2020 – Introduction.docx Page 11 of 12

3. Illustration

Describe a Sample of Continuous Data Example – Unit 1 (Summarizing Data), page 40 Data Entry Method: From Excel – Paste of individual observations Consider again the same study of n=25 consecutive patients entering the general medical/surgical intensive care unit at a large urban hospital. There is one continuous variable in this dataset: age. Goal: A description of the distribution of age Step 1 – In Excel Open icu_540.xlsx. Minimize Excel. Do NOT exit Excel. Step 2 – Launch Art of Stat www.artofstat.com > Web Apps > EXPLORE QUANTITATIVE DATA Step 3 – Replace the dataset shown with your own data. At the upper left, from the dialogue boxes and drop-down menus, make the following selections/inputs: Enter Data: Your Own Do you have: Individual Observations (How nice! There is also an option for entering grouped data here!) Name of Variable: Age You should see the following at this point.

Page 12: 1. Welcome ……………………………………………….…..…………………………………….. 2biep540w/pdf/Art of Stat Handout Fall 20… · Art of Stat/Art

Art of Stat Handout 2020-21 Handout 01 Introduction

… Art of Stat/Art of Stat Handout Fall 2020 – Introduction.docx Page 12 of 12

Step 4 – COPY/PASTE from Excel into Art of Stat Now we copy/paste the column of Excel data corresponding to age Not bad!

Playing around with options at left, I now have the following. You might make different selections; o for it!