• No results found

อ.ธนะภ ม ร ตนาน พงศ ภาคว ชาเวชศาสตร ป องก นและส งคม คณะแพทยศาสตร จ ฬาลงกรณ มหาว ทยาล ย

N/A
N/A
Protected

Academic year: 2021

Share "อ.ธนะภ ม ร ตนาน พงศ ภาคว ชาเวชศาสตร ป องก นและส งคม คณะแพทยศาสตร จ ฬาลงกรณ มหาว ทยาล ย"

Copied!
114
0
0

Loading.... (view fulltext now)

Full text

(1)

Introduction

 

Statistical

 

Analysis

by

 

using

 

SPSS

1

.

ธนะภูมิ

รัตนานุพงศ์

ภาควิชาเวชศาสตร์ป้องกันและส ังคม คณะแพทยศาสตร์ จุฬาลงกรณ์มหาวิทยาลัย
(2)

Contents:

1. Using  SPSS  and interpretation

 Menu, Toolbars

 Data entry and Import data to SPSS 

2. Descriptive statistics

3. Inferential statistics ‐‐ Hypothesis testing

 Continuous data

(3)

Research

  

proposal

1. Title 12. Research Methodology*

2. Background andRationale 13. DataCollection*

3. Review ofRelated Literatures 14. DataAnalysis*

4. Research Questions 15. Ethical Consideration

5. Objectives 16. Limitation

6. Hypothesis 17. Expected Benefit

7. Conceptual Framework 18. Obstacles

8. Assumption 19. Administration&Time

9. Keywords 20. Budget

10. Operational Definition 21. References

11. Research Design 22. Appendix

(4)
(5)

SPSS

( Statistical Package for the Social Sciences )

(http://www‐01.ibm.com/software/analytics/spss/)

(6)

หน้าต่างหลังจากเข้าสู่โปรแกรม SPSS Statistics

(7)

Data Editor – Data View Data Editor – Data View

(8)

Viewer หรือ Output – SPSS for Windows Viewer Viewer หรือ Output – SPSS for Windows Viewer

(9)

Syntax Editor Window Syntax Editor Window

(10)

แต่ละตัวแปร

ผู ้ตอบแบบสอบถามแต่ละคน (แต่ละ ID)

กดเปลี่ยนระหว่างหน้าต่างข้อมูลและหน้าต่างตัวแปร

Data Editor – Data View Data Editor – Data View

(11)

Main Menu บนหน้าต่าง Data Editor Main Menu บนหน้าต่าง Data Editor

File การเปิดไฟล์ข ้อมูลหรือไฟล์ต่างๆ เกี่ยวกับโปรแกรม SPSS และการพิมพ์ ไฟล์

Edit การเปลี่ยนแปลง Preference ของโปรแกรม SPSS

View กําหนดการแสดงทางจอภาพของหน ้าต่าง Data Editor

Data การจัดการไฟล์ข ้อมูล

Transform การเปลี่ยนแปลงค่าของข ้อมูล

Analyze การวิเคราะห์ทางสถิติ

Graphs การสร ้าง Graph Chart

(12)

Icon การทํางาน

Go to - ไปยัง Subject (Case) หรือ variable ตามต ้องการ

Find - ค ้นหาข ้อมูลในตัวแปรนั้นๆ หรือค ้นหาคํา

Insert Case – แทรก Case ตรงตําแหน่งที่ Cursor ปรากฏอยู่

Insert Variable – แทรกตัวแปรตรงตําแหน่งที่ Cursor ปรากฏอยู่

Split File - แยกข ้อมูลตามเงื่อนไขที่ต ้องการ

Weight Cases - การให ้นํ้าหนักของข ้อมูล

Select Cases – การคัดเลือก Case ให ้ตรงกับความต ้องการ

Value Labels – แสดง value label ในหน ้าต่าง Data Editor

Toolbars บนหน้าต่าง Data Editor Toolbars บนหน้าต่าง Data Editor

(13)

Data Editor – Variable View Data Editor – Variable View

(14)

Data Editor – Variable View Data Editor – Variable View

(15)

Data Entry – Variable View Data Entry – Variable View

สามารถกําหนดค่าที่ขาดหายไปหรือข ้อมูลไม่สมบูรณ์ได ้ที่ช่อง Missing เช่น ตัวแปร age ถ ้าป้อนข ้อมูลเป็นเลข 99 หมายถึงไม่มีข ้อมูล / ไม่ตอบ

สามารถกําหนดค่าที่ขาดหายไปหรือข ้อมูลไม่สมบูรณ์ได ้ที่ช่อง Missing เช่น ตัวแปร age ถ ้าป้อนข ้อมูลเป็นเลข 99 หมายถึงไม่มีข ้อมูล / ไม่ตอบ

(16)

Data Entry – Variable View Data Entry – Variable View

ระบุค่าตัวแปรสําหรับข ้อมูลเชิงคุณภาพได ้ที่ช่อง Values เช่นตัวแปร sex

กําหนดให ้ค่าของเลข 0 = เพศชาย 1 = เพศหญิง

ระบุค่าตัวแปรสําหรับข ้อมูลเชิงคุณภาพได ้ที่ช่อง Values เช่นตัวแปร sex

(17)

ในกรณีป้อนข ้อมูลเข ้าไปในโปรแกรมอื่น

เช่น

Excel

และ

ต ้องการนําข ้อมูลเข ้ามาวิเคราะห์ในโปรแกรม

SPSS

พิมพ์ชื่อตัวแปรตามคู่มือลงรหัสที่แถวแรกสุดของ

Excel

(18)

ข ั้นตอนการนําข ้อมูลจากไฟล์

Excel

เข ้า

SPSS

(19)

ข ั้นตอนการนําข ้อมูลจากไฟล์

Excel

เข ้า

SPSS

2. เลือก Files of type เป็น Excel แล ้วกด Open

(20)

ข ั้นตอนการนําข ้อมูลจากไฟล์

Excel

เข ้า

SPSS

(21)

ข ั้นตอนการนําข ้อมูลจากไฟล์

Excel

เข ้า

SPSS

4. ข ้อมูลทั้งหมดจะเข ้ามาอยู่ในรูปแบบโปรแกรม SPSS

5. ทําการตรวจสอบความถูกต ้อง และบ ันทึกข ้อมูล ไฟล์ที่ได ้จะมีนามสกุล .sav

(22)

The Process of Data Analysis

Data Management

- Data collection, Data entry - Data transfer

- Data cleaning

Exploratory Data Analysis

- Checking the data

- Outliers, distribution of the variables, exploring the relationship between variables

- Transformations

(23)

The Process of Data Analysis

Data Management

- Data cleaning

การจัดการกับข ้อมูลด ้วยคอมพิวเตอร์

:

 ปรับปรุงความถูกต ้องของข ้อมูล  ป้องกันความผิดพลาดที่เกิดจากการประมวลผลและวิเคราะห์ข ้อมูล

นําเทคนิคการป้อนข ้อมูลแบบ

Double entry

มาใช ้

(

ใช ้ผู ้ป้อนข ้อมูล

2

คนเพื่อดูความคลาดเคลื่อนของการป้อนข ้อมูล

)

จัดข ้อมูลให ้อยู่ในพิสัยและหมวดหมู่ที่ยอมรับได ้

23
(24)

The Process of Data Analysis

Data Management

- Data cleaning

Range checks

Logical checks / consistency check

Dates

(25)

The Process of Data Analysis

Data Management

- Data cleaning

Range checks -

Check for

Values outside of plausible range

 Categorical variables, e.g.

1=Mild, 2=Moderate, 3=Severe

1=Yes, 2=No

 Continuous variables, e.g.-- Height, weight, cholesterol

หากพบค่าที่ “ไม่ตรงตามหวดหมู่” “เป็นไปไม่ได้” หรือ “เกินพิส ัย”

ควรทําการยืนยันด้วยการกลับไปดูรายงานตัวจริงตรวจสอบและแก ้ไข!

(26)

The Process of Data Analysis

Data Management

- Data cleaning

Logical checks / consistency check -

Check values

against :

Related variables

(27)

The Process of Data Analysis

Data Management

- Data cleaning

Logical checks / consistency check -

Check values

against :

Related variables

 ตรวจสอบว่าค่าต่างๆ ที่บ ันทึกไว ้นั้นสอดคล ้องกลมกลืนกันหรือไม่  ตรวจสอบความคลาดเคลื่อนอย่างไร? - ใช ้วิธีทําตาราง (Cross tabulation) ประวัติการเจ็บป่วยใน รอบปีที่ผ่านมา เพศ ชาย หญิง วัณโรคปอด 75 18 ถุงลมโป่งพอง 87 23 มะเร็งปากมดลูก 6 56 ข้ดแย้งกัน 27

(28)

คําส ั่งเบื้องต้นในการจ ัดการข้อมูล

-

“Sort Cases”

เป็นคําส ั่งที่ใช ้เรียง Case ตามตัวแปรใดตัวแปรหนึ่ง สามารถเรียงจากน ้อยไปมาก (Ascending)

(29)

คําส ั่ง “Select Cases” Data ---> Select Cases เลือก If condition is satisfied และเลือก If

เป็นคําส ั่งที่ใช ้เลือก Case โดยให ้มี condition ตามที่ต ้องการเพื่อมาวิเคราะห์ต่อ

คําส ั่งเบื้องต้นในการจ ัดการข้อมูล

-

“Select Cases”

(30)

คําส ั่งเบื้องต้นในการจ ัดการข้อมูล

-

“Select Cases”

เลือกตัวแปรที่ต ้องการกําหนดเงื่อนไขสําหรับการคัดเลือกคุณล ักษณะของข ้อมูล ในที่นี้เลือกตัวแปร sex ที่ เป็นเพศหญิง (sex = 1)

(31)

คําส ั่งเบื้องต้นในการจ ัดการข้อมูล

-

“Select Cases”

(32)

ใช ้คําสั่งนี้เพื่อสร ้างตัวแปรใหม่

กลุ่มอายุ

จากตัวแปรเดิม

อายุ

(33)

คําส ั่งเบื้องต้นในการจ ัดการข้อมูล

-

“Recode”

คําส ั่ง “Recode” Transform ---> Recode into Different Variables…

(34)

2. พิมพ์ตั้งชื่อตัวแปรใหม่

“agecat

3. หล ังจากนั้นกดปุ่ม change

1. เลือกตัวแปรอายุ (age) ใส่เข ้าไป

4. กดปุ่ม “Old and New Values”

(35)

1. ใส่ช่วงอายุที่ต ้องการเข ้าไปด ้านซ ้ายมือ (Old Value)

คําส ั่งเบื้องต้นในการจ ัดการข้อมูล

-

“Recode”

2. ใส่ค่าให ้ตัวแปรกลุ่มอายุ ด ้านขวา (New Value) 3. หล ังจากนั้นกดปุ่ม Add 4. ทําต่อจนครบทุกกลุ่มอายุ หล ังจากนั้นกดปุ่ม “Continue” และ “OK” ตามลําดับ 35
(36)
(37)

ใช ้คําสั่งนี้เพื่อให ้เครื่องคํานวณสร ้างตัวแปรใหม่ขึ้นมา

คําส ั่งเบื้องต้นในการจ ัดการข้อมูล

-

“Compute”

(38)

เช่น ต ้องการสร ้างตัวแปร bmi (kg/m2) จากตัวแปร wt (kg) และ ht (cm) 1. พิมพ์ชื่อตัวแปรใหม่ที่ต ้องการสร ้าง ลงช่อง Target Variable 2. เลือกตัวแปรมาใส่สูตรให ้ถูกต ้อง wt / (ht / 100) **2 3. กดปุ่ม OK

คําส ั่งเบื้องต้นในการจ ัดการข้อมูล

-

“Compute”

(39)

ได ้ตัวแปรใหม่ดัชนีมวลกาย

“bmi”

คําส ั่งเบื้องต้นในการจ ัดการข้อมูล

-

“Compute”

(40)

Describe the basic features of data in a study

Provide summaries about the sample and measures Tools:

• Tables • Graphs

• Numerical summaries

• Use sample data to draw

inference about the population

• Investigate relationship, models,

and hypothesis

• Make judgment about what we

observe Tools:

• Estimation and CI • Hypothesis testing • Modeling

Descriptive Statistics

Inferential Statistics

(41)
(42)

ตัวแปรเชิงคุณภาพ

(Qualitative variables)

เพศ : ชาย / หญิงการตาย หรือ การรักษาหาย : ใช่ / ไม่ใช่ ( Yes / No) วิเคราะห์และพรรณนาข้อมูลในรูปของ : • ร้อยละ (percentage) • สัดส่วน (proportion) • อัตราส่วน (ratio) • อัตรา (rate) วิธีแสดงผลที่เหมาะสม • แผนภูมิแท่ง (Bar Chart) • แผนภูมิวงกลม (Pie Chart)
(43)

คําส ั่ง

Frequencies -

เพื่อนับจํานวนและคิดร ้อยละของตัวแปรต่างๆ

1. เลือก Analyze ---> Descriptive Statistics --->

(44)

คําส ั่ง

Frequencies -

เพื่อนับจํานวนและคิดร ้อยละของตัวแปรต่างๆ

2. เลือกตัวแปรที่ต ้องการใส่เข ้าไปใน ช่อง Variable(s)

(45)
(46)

ตัวแปรเชิงปริมาณ

(Quantitative Data)

1. การวัดแนวโน้มสู่ส่วนกลาง (Measures of Central tendency) 2. การวัดการกระจายของข้อมูล (Measures of dispersion)

การหาค่ากลาง การกระจายของข้อมูล

ค่าเฉลี่ย (Mean) + ส่วนเบี่ยงเบนมาตรฐาน (S.D.)

มัธยฐาน (Median) + ค่าพิสัยควอไทล์

(47)

คําส ั่ง

Descriptives

เพื่อหาค่าเฉลี่ยและส่วนเบี่ยงเบนมาตรฐาน

สําหรับข ้อมูลเชิงปริมาณ

1. เลือก Analyze ---> Descriptive Statistics --->

(48)

คําส ั่ง

Descriptives

เพื่อหาค่าเฉลี่ยและส่วนเบี่ยงเบนมาตรฐาน

สําหรับข ้อมูลเชิงปริมาณ

2. เลือกตัวแปรที่ต ้องการใส่เข ้าไปใน ช่อง Variable(s)

(49)

คําส ั่ง

Descriptives

เพื่อหาค่าเฉลี่ยและส่วนเบี่ยงเบนมาตรฐาน

สําหรับข ้อมูลเชิงปริมาณ

4. หล ังจากนั้นเลือกสถิติที่ต ้องการ ให ้แสดงใน Output 5. หล ังจากนั้นกดปุ่ม “Continue” และ “OK” ตามลําดับ
(50)

คําส ั่ง

Descriptives

เพื่อหาค่าเฉลี่ยและส่วนเบี่ยงเบนมาตรฐาน

สําหรับข ้อมูลเชิงปริมาณ

(51)

คําส ั่ง

Explore

1. เลือก Analyze ---> Descriptive Statistics --->

(52)

คําส ั่ง

Explore

2. เลือกตัวแปรที่ต ้องการใส่เข ้าไปใน ช่อง Variable(s)

3. เลือก Plots เพื่อให ้แสดงกราฟ เลือก

(53)
(54)
(55)

ตัวแปรเชิงปริมาณ

(Quantitative Data)

Biostatistics, Pattaya 55 การว ัดการกระจายของข ้อมูล (Measure of dispersion)

เส ้นโค ้งความถี่สามารถช่วยบอกกากระจายของข ้อมูล

(56)
(57)

ตัวแปรเชิงปริมาณ

(Quantitative Data)

(58)

ตัวแปรเชิงปริมาณ

(Quantitative Data)

(59)

ตัวแปรเชิงปริมาณ

(Quantitative Data)

การว ัดการกระจายของข ้อมูล (Measure of dispersion)

(60)
(61)

• Investigate relationship, models, and hypothesis • Make judgment about what we observe

infer or generalize characteristics of “the whole” (population) from characteristics of “the part” (sample)

Tools: • Estimation and CI • Hypothesis testing • Modeling

Inferential Statistics

Biostatistics, Pattaya 61
(62)

1

sample

 

t

test

Ho :  = 40 1. เลือก Analyze ---> Compare Means ---> One-Sample T Test

คําถาม

:

อายุเฉลี่ยของอาสาสม ัครนั้นมีอายุเท่ากับ

40

ปี

หรือไม่

Inferential

  

Statistics

(63)

1

sample

 

t

test

2. เลือกตัวแปรที่ต ้องการใส่เข ้าไปใน ช่อง Variable(s) 3. ทดสอบกับค่าอะไร? (ค่าของ Ho) แล ้วเลือก OK

คําถาม

:

อาสาสม ัครมีอายุแตกต่างจาก

40

ปี

หรือไม่

Inferential

  

Statistics

(64)

1

sample

 

t

test

Ho :  = 40

คําถาม

:

อายุเฉลี่ยของอาสาสม ัครนั้นมีอายุเท่ากับ

40

ปี

หรือไม่

p-value < 0.001 ปฏิเสธ Ho สรุปได้ว่าอาสาสม ัครมีอายุเฉลี่ยแตกต่างจาก อายุ 40 ปี อย่างมีนัยสําคัญทางสถิติ (p-value < 0.001)

Inferential

  

Statistics

(65)

Inferential

  

Statistics

2

sample

 

(unpaired)

 

t

test

Ho : 1 = 2

คําถาม

:

อายุเฉลี่ยของอาสาสม ัครเพศชายและเพศหญิงแตกต่างกัน

หรือไม่

1. เลือก Analyze ---> Compare Means ---> Independent-Sample T Test

(66)

Inferential

  

Statistics

2

sample

 

(unpaired)

 

t

test

คําถาม

:

อายุเฉลี่ยของอาสาสม ัครเพศชายและเพศหญิงแตกต่างกัน

หรือไม่

2. เลือกตัวแปรที่ต ้องการใส่เข ้าไปใน ช่อง Test Variable(s): 3. Grouping Variable: เลือกตัวแปร ต ้น (เชิงคุณล ักษณะ) ที่ต ้องการทดสอบ แล ้วเลือก Define Groups
(67)

Inferential

  

Statistics

2

sample

 

(unpaired)

 

t

test

คําถาม

:

อายุเฉลี่ยของอาสาสม ัครเพศชายและเพศหญิงแตกต่างกัน

หรือไม่

4. Define Groups ของตัวแปรให ้รหัส ตามคู่มือลงรหัส ในที่นี้ต ้องการทดสอบ เพศชาย = 0 และเพศหญิง = 1 จากนั้น เลือก Continue และ OK ตามลําดับ
(68)

Inferential

  

Statistics

2

sample

 

(unpaired)

 

t

test

คําถาม

:

อายุเฉลี่ยของอาสาสม ัครเพศชายและเพศหญิงแตกต่างกัน

หรือไม่

1) Test for equality of variances H0 : Equal variances

p‐value = 0.014 (p < 0.05)

(Report this pvalue)

Reject H0

Male and female population have 

(69)

Inferential

  

Statistics

2

sample

 

(unpaired)

 

t

test

คําถาม

:

อายุเฉลี่ยของอาสาสม ัครเพศชายและเพศหญิงแตกต่างกัน

หรือไม่

2) Test for equality of mean H0: Equal mean 

p‐value > 0.05 (Don’t Report this p)

Accept Ho

(70)

Normality in each group

Test variances

Test mean: Pooled variance formula

For SPSS, see

“Equal variances assumed”

Test mean: Separate variance formula

For SPSS, see

“Equal variances not assumed”

1. Non‐parametric test (Mann‐Whitney U test)

Or 2. Transform data

Test for normality

Samples

x1 , x2

Equal Unequal

(71)

Inferential

  

Statistics

Paired t-test

ใช ้คําสั่งนี้เพื่อเปรียบเทียบค่าเฉลี่ยระหว่าง

2

กลุ่มที่ไม่อิสระ

ต่อกัน

เช่น

เปรียบเทียบก่อน

-

หล ัง

,

ข ้างซ ้าย

-

ข ้างขวา

A total of 12 experimental  animals  were  

subjected  to  conditions  simulating 

disease.  The number of heartbeats per 

minute before and after the experiment 

were recorded as follows :

Do these data provide sufficient evidence 

to indicate that the experimental  

condition increases the number of 

(72)

Inferential

  

Statistics

Paired t-test

1. เลือก Analyze ---> Compare Means ---> Paired-Sample T Test

(73)

Inferential

  

Statistics

Paired t-test

2. เลือก before ใส่ใน Paired Variables และ after ใส่ใน

(74)

Inferential

  

Statistics

Paired t-test

แสดงว่า อ ัตราการเต้นหัวใจของส ัตว์ทดลองก่อนและหลังแตกต่างกันอย่างมีนัยสําคัญทางสถิติ (p-value < 0.001) Ho : อัตราการเต้นหัวใจของ สัตว์ทดลองก่อนและหลังไม่ แตกต่างกัน หรือ Reject Ho
(75)

Inferential

  

Statistics

1

way

 

ANOVA

 

(Analysis

 

of

 

Variance)

คําถาม: อาสาสม ัครที่มีพฤติกรรมการสูบบุหรี่ในแบบต่างๆ มีอายุเฉลี่ยแตกต่างกัน หรือไม่

Ho : 1 = 2 = 3

1. เลือก Analyze ---> Compare Means ---> One-Way ANOVA

(76)

Inferential

  

Statistics

1

way

 

ANOVA

 

(Analysis

 

of

 

Variance)

คําถาม: อาสาสม ัครที่มีพฤติกรรมการสูบบุหรี่ในแบบต่างๆ มีอายุเฉลี่ยแตกต่างกัน หรือไม่ 2. เลือกตัวแปรตาม (เชิงปริมาณ) ที่ ต ้องการใส่เข ้าไปในช่อง Dependent List: 3. เลือกตัวแปรต ้น (เชิงคุณล ักษณะ) ที่ ต ้องการใส่เข ้าไปในช่อง Factors:

(77)

Inferential

  

Statistics

1

way

 

ANOVA

 

(Analysis

 

of

 

Variance)

คําถาม: อาสาสม ัครที่มีพฤติกรรมการสูบบุหรี่ในแบบต่างๆ มีอายุเฉลี่ยแตกต่างกัน หรือไม่ 4. เลือก Options เลือกให ้แสดงสถิติ Descriptive และให ้มีการทดสอบ ความแปรปรวน หล ังจากนั้นเลือก Continue และ OK ตามลําดับ

(78)

Inferential

  

Statistics

1

way

 

ANOVA

 

(Analysis

 

of

 

Variance)

(79)

Inferential

  

Statistics

1

way

 

ANOVA

 

(Analysis

 

of

 

Variance)

คําถาม: อาสาสม ัครที่มีพฤติกรรมการสูบบุหรี่ในแบบต่างๆ มีอายุเฉลี่ยแตกต่างกัน หรือไม่

Levene test

H0:     Equal variances of age among 3 pop’n

H1 Unequal variances

p‐value = 0.622 Do not reject H0 Equal variances of age among 3 pop’n

(80)

Inferential

  

Statistics

1

way

 

ANOVA

 

(Analysis

 

of

 

Variance)

คําถาม: อาสาสม ัครที่มีพฤติกรรมการสูบบุหรี่ในแบบต่างๆ มีอายุเฉลี่ยแตกต่างกัน หรือไม่

p‐value = 0.040 Reject Ho

Thus, there is a statistically significant difference

in mean age among 3 groups (p‐value = 0.040).

(81)

Samples

Normality in each group

Test variances

Test Mean: F‐test “ANOVA table”

Test Mean: Welch test

“Robust Test of Equality of Means”

1. Non‐parametric test (Kruskal‐Wallis test)

Or 2. Transform data

Test for normality

Equal Unequal ~ Normal ~ Normal Compare groups Equal Unequal Done Done Equal Unequal Compare groups

(82)

Inferential

  

Statistics

1

way

 

ANOVA

 

(Analysis

 

of

 

Variance)

Post

 

Hoc

 

Multiple

 

Comparisons

If equal variances: 

1. All possible pairwise comparisons

3 groups1 vs. 2,   1 vs. 3,   2 vs. 3

Equal n       Tukey

Slightly different n Gabriel

Very different n      Hochberg’s GT2

2. Compare only some interesting groups Bonferroni

4 groups1 vs. 2,   2 vs. 3,   3 vs. 4

p‐value 0.05/3 (=0.0167) Stat. significance

3. Compare each group with controlDunnette

(83)

Inferential

  

Statistics

1

way

 

ANOVA

 

(Analysis

 

of

 

Variance)

Post

 

Hoc

 

Multiple

 

Comparisons

If unequal variances:

(84)

Inferential

  

Statistics

1

way

 

ANOVA

 

(Analysis

 

of

 

Variance)

Post

 

Hoc

 

Multiple

 

Comparisons

(85)

Inferential

  

Statistics

1

way

 

ANOVA

 

(Analysis

 

of

 

Variance)

Post

 

Hoc

 

Multiple

 

Comparisons

2. เลือกวิธีทดสอบ ในที่นี้ เลือกวิธี Bonferroni

จากนั้นเลือก Continue

(86)

Inferential

  

Statistics

1

way

 

ANOVA

 

(Analysis

 

of

 

Variance)

Post

 

Hoc

 

Multiple

 

Comparisons

3. พิจารณาคู่ที่แตกต่างในที่นี้พบว่า กลุ่มที่เคยสูบบุหรี่แต่ปัจจุบ ันเลิกแล ้วมีอายุเฉลี่ย แตกต่างกับกลุ่มที่ปัจจุบ ันสูบบุหรี่ อย่างมีนัยสําคัญทางสถิติ (p-value = 0.042)

(87)

Continuous Outcomes

Remember: Always verify assumptions before using a test!

1 sample 2 samples ≥2 samples

Variance (σ2) 

known?

Z test t test

Independent?

Paired t test Variance (σ2) 

known?

Variances equal?

Z test

t test with unequal 

variance

t test with pooled 

variance ANOVA Yes No No No No Yes Yes Yes

Inferential

  

Statistics

(88)

Inferential

  

Statistics

Correlation

1. เลือก Analyze ---> Correlate ---> Bivariate

(89)

Inferential

  

Statistics

Correlation

2. เลือกตัวแปรตาม (เชิงปริมาณ) ที่ต ้องการใส่เข ้าไปในช่อง Variables:

(90)

Inferential

  

Statistics

Correlation

p-value < 0.05 Reject Ho

สรุปได ้ว่า เส ้นรอบเอว และ Percent Body Fat ของอาสาสม ัครมีความส ัมพ ันธ์กัน อย่างมีนัยสําคัญทางสถิติ (p-value < 0.001)

(91)

Inferential

  

Statistics

Scatter

 

plot

1. เลือก Graphs ---> Legacy Dialogs --->

(92)

Inferential

  

Statistics

Scatter

 

plot

2. เลือก Simple Scatter และ เลือก Define 3. เลือกตัวแปรเชิงปริมาณที่ต ้องการใส่ ใน Y Axis: และ X Axis:
(93)

Inferential

  

Statistics

Scatter

 

plot

4. เลือกตัวแปรเชิงปริมาณที่ ต ้องการใส่ใน Y Axis: และ X Axis: หล ังจากนั้นเลือก OK
(94)

Inferential

  

Statistics

(95)

Test of Association

Chi-square test (Independent sample)

Mc Nemar’s test (Dependent sample)

Method for Categorical Data

Measure of Strength Association

Relative Risk (Cohort study)

Odds Ratio (Case-Control study)

Categorical

 

data

 

analysis

(96)

Test for Goodness of fit

Test for Homogeneity

Test for Association

Chi-Square Test

Categorical

 

data

 

analysis

(97)

Chi square Test

เงื่อนไขในการใช ้

ข ้อมูลท ั้งหมดเป็นข ้อมูลสุ่มตลอด

ค่าคาดหว ัง

(Expected value) > 1

ใช ้ในกรณี

1< Expected < 5

น้อยกว่า

20%

ของ

rc

แต่ในกรณี

1< Expected < 5

มากกว่า

20%

ของ

rc --

รวมกลุ่ม

ย่อยของตัวแปรเข้าด้วยกัน

Categorical

 

data

 

analysis

(98)

Crosstabs

ใช ้คําสั่งนี้สําหรับตัวแปรเชิงคุณภาพ

2

ตัวแปรเพื่อสร ้างตาราง

R x C

Inferential

  

Statistics

1. ใส่ตัวแปรเชิงคุณล ักษณะทั้งสอง ตัวแปรที่ต ้องการ ในแนว Row และ ในแนว Column
(99)

ต ้องการสร ้างตาราง 3 x 2 ระหว่าง ตัวแปรระดับกิจกรรมทางกาย (น ้อย ปานกลาง มาก) และตัวแปรเพศ (ชาย หญิง) 2. ถ ้าต ้องการค่าร ้อยละในแนว Row หรือ Column ให ้กดปุ่ม Cells ถ ้าต ้องการค่า Chi-square ให ้กด ปุ่ม Statistics

Crosstabs

ใช ้คําสั่งนี้สําหรับตัวแปรเชิงคุณภาพ

2

ตัวแปรเพื่อสร ้างตาราง

R x C

Inferential

  

Statistics

(100)

กดปุ่ม Cells เพื่อเลือกให ้แสดงร ้อยละในรูปแบบที่ต ้องการ 3. เลือกคิดร ้อยละตาม แนว Row หรือ Column หล ังจากนั้นกดปุ่ม Continue

Crosstabs

ใช ้คําสั่งนี้สําหรับตัวแปรเชิงคุณภาพ

2

ตัวแปรเพื่อสร ้างตาราง

R x C

Inferential

  

Statistics

(101)

Crosstabs

ใช ้คําสั่งนี้สําหรับตัวแปรเชิงคุณภาพ

2

ตัวแปรเพื่อสร ้างตาราง

R x C

Inferential

  

Statistics

สถิติที่ใช ้ Chi-square 4. เลือก Statistics หล ังจากเลือก Chi-square หล ังจากนั้นเลือก Continue และ OK ตามลําดับ
(102)

Crosstabs

ใช ้คําสั่งนี้สําหรับตัวแปรเชิงคุณภาพ

2

ตัวแปรเพื่อสร ้างตาราง

R x C
(103)

Crosstabs

ใช ้คําสั่งนี้สําหรับตัวแปรเชิงคุณภาพ

2

ตัวแปรเพื่อสร ้างตาราง

R x C

Inferential

  

Statistics

ปฏิเสธ H0 สรุปได ้ว่าระดับกิจกรรม ทางกาย (น ้อย ปานกลาง มาก) และ ตัวแปรเพศ (ชาย หญิง) มี ความส ัมพ ันธ์กันอย่างมีนัยสําคัญ ทางสถิติ (p-value < 0.001) ค่า Pearson Chi-Square: ซึ่งเป็นค่าสถิติที่ใช ้ในการทดสอบสมมติฐานที่ตั้งไว ้

Pearson Chi-Square = 30.220 ซึ่งค่า Asymptotic Significance (Asymp Sig.) ของการ

(104)

กรณีตัวอย่างที่ 1

ค่า Expected value
(105)

กรณีตัวอย่างที่ 1

1< Expected < 5 เกิน 20% ของ rc

(106)
(107)

กรณีตัวอย่างที่ 2

ค่า Expected value
(108)
(109)

Goal

Type of Data

Normal Population Rank, Score, Non-normal Population

Binomial Compare one

group to a

Hypothetical value

One Sample t-test Wilcoxon test Chi-square, Binomial test Compare two

unpaired groups

Unpaired t-test Mann-Whitney U test

Fisher’s test (Chi-square for large sample)

Compare two paired groups

Paired t-test Sign test, Wilcoxon

Signed-rank test

McNemar’s test

(110)

Goal

Type of Data

Normal Population Rank, Score, Non-normal Population

Binomial Compare three or

more unmatched groups

One-way ANOVA Kruskal – Wallis test Chi-square Compare three or more matched groups Repeated-measures ANOVA

Friedman test Cochrane Q

(111)

ตัวแปรต้น

Y X

1-sample t-test Quantitative 1 Factor

(e.g., SBP) (e.g., Drug A)

Compare SBP before & after taking drug A

2-sample t-test Quantitative 1 Factor

(e.g., SBP) (e.g., Drug A, B)

Compare mean SBP between 2 groups

1-way ANOVA Quantitative 1 Factor

(e.g., SBP) (e.g., Drug A, B Drug A, B, C)

Compare mean SBP among ≥ 2 groups

2-way ANOVA Quantitative 2 Factors

(e.g., SBP) (Drug: A, B Dose: Low, High)

(112)

Linear regression

Y = Height of children

X’s = gender, age, milk, etc.

Binary logistic regression

Y = Dead/Alive

X’s = age, severity, etc.

Cox’s regression (Cox’s proportional hazard model)

Y = Time to death

X’s = age, severity, etc.

Ordinal logistic regression

Y = Worse/Same/Better

X’s = age, severity, etc.

(113)

References :

1. Altman DG. Pratical Statistics for medical Research. Chapman & Hill, 1996. 2. Daniel WW. Biostatistics: A foundation for Analysis in the Health Sciences. 6th

Edition, 1995 John Wileys &Son, Inc.

3. กัลยา วานิชย์บัญชา. การใช้ SPSS for Windows ในการวิเคราะห์ข้อมูล. บริษัท ธรรมสาร จํากัด, 2549. 4. ดุสิต สุจิรารัตน์. การวิเคราะห์ข้อมูลด้วยโปรแกรม SPSS for Windows เล่มที่ 1, 2. เจริญดี การพิมพ์, 2550. 5. สมรัตน์ เลิศมหาฤทธิ์. เอกสารประกอบการสอน สถิติในงานวิจัยด้านสุขภาพ. 2011 6. วิฑูรย์ โล่ห์สุนทร. เอกสารประกอบการสอนการใช้โปรแกรม SPSS ในการวิเคราะห์ข้อมูล และคําสั่งเบื้องต้นในการจัดการข้อมูล. 2012

7. จุฬาลักษณ์ โกมลตรี. เอกสารประกอบการสอน 2-sample t-test, 1-way ANOVA, Multiple linear regression Multiple logistic regression. 2011

(114)

References

Related documents

As the provider of strategic and corporate services to the public safety portfolio agencies, PSBA assumed responsibility for public sector ethics and Code of Conduct training for

So, you might only build 10 of this board down this production line through this particular process, but you have 50 other boards you build on this same process, so instead of

URGENT REQUEST FOR PROVISION OF WATER TANKS, RELIABLE WATER SUPPLY, AND SANITATION PACKS TO COMMUNITIES WITHOUT ACCESS TO WATER.. We refer to the above and confirm that the

features you’re looking for. You would normally buy an annuity at the same time as you take your main LGPS benefits. However, if you left the LGPS before 1 April 2014, you can

(You can only improve the ecology index of the production lines themselves by replacing certain lines.) If the environmental damage indicator drops below the legally

She has spent more than 20 years as a trial lawyer, representing people and businesses in a variety of cases that include personal injury and commercial claims.... Hire real

Service-oriented data denormalization exploits the fact that UDI queries and transactions often access only a part of the columns of a table. Decomposing such tables into

Using a large administrative dataset from a statewide community college system, the authors employed an instrumental variable technique to estimate the impact of online