SPSS LAP assignment

profileDanyah
stat_lab_6_sp15-2.pptx

LAB 6:

Contingency Table Analysis

(Chi-Square Analysis)

1

Be able to correctly use and interpret Pearson Chi-Square test, a test for independence between two qualitative variables.

Pearson Chi-Square test, a test for independence

Is used to examine the relationship between two qualitative variables.

Involves two qualitative variables

The null hypothesis: There is no association (relationship) between the two variables

The alternative hypothesis: The two variables are associated

Assumptions:

Random Sample: The sample should be randomly selected from the population

Independence: Observations must be independent from each other (Not matched pairs)

Introduction

See Chapter 7- section 7.2 for more details

2

Assumptions:

Adequate sample size :

No more than 20% of the cells having expected count ­< 5

The expected frequency (count) in each cell must be ≥1

If the expected frequencies are too small then FISHER’S EXACT TEST should be used in place of the Pearson Chi-square

If independence cannot be assumed then another non-parametric test called the MCNEMAR test must be used

Scenario when you would use Chi-Square test:

Does smoking status at baseline depend on gender?

Is there a relationship between coffee consumption and age group?

Introduction

3

Chi-Square Test Statistics

2 Qualitative (Nominal)

Variables

Ho : There is no association between the 2 variables

(2 vars. are indep.)

Ha : There is an association between the 2 variables

(2 vars. not indep.)

Contingency Table Analysis

All assumptions are met

Pearson Chi-Square

Sample size assumption is not met (the expected frequencies are too small)

Fisher’ Exact Test

The assumption of independence is not met. (Paired observation)

McNemar Test

Evidence or Proof
P-value (Sig.) If p-value ≤ 0.05, we reject the null hypothesis
If p-value > 0.05, we fail to reject the null hypothesis

Question 1. Is there a relationship between marital status and gender?

Answer:

Hypothesis:

Assumptions:

Random Sample: The sample is randomly selected from the population Met

Independence: Observations are independent from each other (Not matched pairs) Met

Sample Size:

No more than 20% of the cells having expected frequency (count) ­< 5 Yes  No

The expected frequency (count) in each cell must be ≥1 Yes  No

See the SPSS outputs (slide 9)

7

Answer:

To Obtain Chi-Square:

From the menus choose:

Analyze Descriptive Statistics Crosstabs option Select marital status as the row variable Select gender as the column variable Click Cells and select column and row percentages Click continue Click statistics option and select Chi-square Click continue then ok

.

8

Assumptions met

SPSS outputs:

Since we have two qualitative variables and all the assumptions are met, Pearson Chi-Square should be used to answer this research question.

9

Summary Table:

Decision:

 

Fail to reject the null hypothesis (FTR) √ Reject

Since P-value greater than alpha = 0.05, we fail to reject the null hypothesis.

Conclusion (Interpretation):

There is no relationship between marital status and gender

Column %

10

Question 2. Is there a relationship between marital status and BMI categories at baseline?

Answer:

Hypothesis:

Assumptions:

Random Sample: we will that the sample are randomly selected from the population Met

Independence: Observations are independent from each other ( Not matched pairs) Met

Sample Size:

No more than 20% of the cells having expected frequency (count) ­< 5 Yes  No

The expected frequency (count) in each cell must be ≥1 Yes  No

See the SPSS output (slide 13)

11

Answer:

To Obtain Chi-Square:

From the menus choose:

Analyze Descriptive Statistics Crosstabs option Select BMI categories at baseline as the row variable Select marital status as the column variable Click Cells and select column and row percentages Click continue Click statistics option and select Chi-square Click continue then ok

.

12

Assumption is not met

SPSS outputs:

Since we have two qualitative variables and not all the assumptions are met, Fisher’s Exact test should be used to answer this research question.

13

Answer:

To Obtain Fisher’s Exact Test:

From the menus choose:

Analyze Descriptive Statistics Crosstabs option Select BMI categories at baseline as the row variable Select marital status as the column variable Click Cells and select column and row percentages Click continue

Click statistics option and select Chi-square Click Exact option and select Monte Carlo with 99%CI Click continue then ok

.

14

SPSS outputs:

15

Summary Table:

Decision:

 

Fail to reject the null hypothesis (FTR) √ Reject

Since P-value greater than alpha = 0.05, we fail to reject the null hypothesis.

Conclusion (Interpretation):

There is no association between marital status and BMI categories at baseline

16

:

o

Thereisnoassociationbetweenthetwovariabl

es

H

:

a

Thereisanassociationbetweenthetwovariabl

es

H

N %N%

SINGLE53.1%114.5%

MARRIED13886.8%19278.0%

Other1610.1%4317.5%

Chi-square value (2, N=405) = 4.98, p-value =0.083)

MaleFemale

Marital Status

P-value*

0.083

Confounding

Basic Model 1.044 0.638 1.711
Adjusted for Smoking 1.086 0.652 1.806 4.02 2.19 5.55
Adjusted for Exercise 1.075 0.644 1.794 2.97 0.94 4.85
Adjusted for BMI 1.258 0.744 2.127 20.50 16.61 24.31

Descriptive I

Table 1 – General Characteristics of Study Paticipants
Characteristics Study Participants
n
Age,yeara
Body Mass Indexa
Stressd
Low
High
Genderc
Male
Female
Smokingd
Never
Ever
Exercisec
None
Mild
Moderate / Vigorous
a Value are means± SD
bValue are median(range)
cValue are number (Percentages)
dValid perecentages are used due to missing values

Descriptive II

Table 2 – General Characteristics of Study Paticipants Stratified by Hypertention Status
Characteristics Hypertention Status P-value§
Normal Abnormal
n= n=
Age,yeara
Body Mass Indexa
Stressb
Low
High
Genderb
Male
Female
Smokingb
Never
Ever
Exerciseb
None
Mild
Moderate / Vigorous
a Value are means± SD
bValue are number (Percentages)
§ The independent t test was used for quantitaive variables and Chi-square test was used for qualitative variables

Logisitc Regression

Final Model
Table 3. Multiple LogisticRegression Analysis of the Effect of Stress on Hypertension After Adjusting for Age and Gender
Odds ratio 95% C.I.for Odds ratio P-value
Lower Upper
Stress
High
Low Reference
Gender
Male
Female Reference
Age
BMI
Table 3: Odds ratios ( 95% confidence interval) for Multiple Logistic Regression
Stress
Odds Ratio (High vs Low) 95% CI p-value
Unadjusted model
Adjusted model for gender and age only
Adjusted model for age gender and BMI

Sheet1

Gender P-value*
Male Female
N % N %
Marital Status SINGLE 5 3.1% 11 4.5% 0.083
MARRIED 138 86.8% 192 78.0%
Other 16 10.1% 43 17.5%
Chi-square value (2, N=405) = 4.98, p-value =0.083)

N %N %N %

Normal637.5%8826.7%1118.6%

Overweight637.5%14042.4%2949.2%

Obese425.0%10230.9%1932.2%

BMI Categories at

Baseline

P-value**

0.560

**Fisher's Exact value = 2.98,

p

-value =0.560

Marital Status

SingleMarriedOther

Confounding

Basic Model 1.044 0.638 1.711
Adjusted for Smoking 1.086 0.652 1.806 4.02 2.19 5.55
Adjusted for Exercise 1.075 0.644 1.794 2.97 0.94 4.85
Adjusted for BMI 1.258 0.744 2.127 20.50 16.61 24.31

Descriptive I

Table 1 – General Characteristics of Study Paticipants
Characteristics Study Participants
n
Age,year a
Body Mass Index a
Stress d
Low
High
Gender c
Male
Female
Smoking d
Never
Ever
Exercise c
None
Mild
Moderate / Vigorous
a Value are means± SD
b Value are median(range)
c Value are number (Percentages)
d Valid perecentages are used due to missing values

Descriptive II

Table 2 – General Characteristics of Study Paticipants Stratified by Hypertention Status
Characteristics Hypertention Status P-value §
Normal Abnormal
n= n=
Age,year a
Body Mass Index a
Stress b
Low
High
Gender b
Male
Female
Smoking b
Never
Ever
Exercise b
None
Mild
Moderate / Vigorous
a Value are means± SD
b Value are number (Percentages)
§ The independent t test was used for quantitaive variables and Chi-square test was used for qualitative variables

Logisitc Regression

Final Model
Table 3. Multiple LogisticRegression Analysis of the Effect of Stress on Hypertension After Adjusting for Age and Gender
Odds ratio 95% C.I.for Odds ratio P-value
Lower Upper
Stress
High
Low Reference
Gender
Male
Female Reference
Age
BMI
Table 3: Odds ratios ( 95% confidence interval) for Multiple Logistic Regression
Stress
Odds Ratio (High vs Low) 95% CI p -value
Unadjusted model
Adjusted model for gender and age only
Adjusted model for age gender and BMI

Sheet1

Gender P-value
Male Female
N % N %
Marital Status SINGLE 5 3.1% 11 4.5%
MARRIED 138 86.8% 192 78.0%
Other 16 10.1% 43 17.5%
Marital Status P-value**
Single Married Other
N % N % N %
BMI Categories at Baseline Normal 6 37.5% 88 26.7% 11 18.6% 0.560
Overweight 6 37.5% 140 42.4% 29 49.2%
Obese 4 25.0% 102 30.9% 19 32.2%
**Fisher's Exact value = 2.98, p -value =0.560