When you are willing to make sacrifices for a great cause, you will never be alone.
Kursus SPSS dalam HSR JKNT 2012 1
Which Test?
Characterization of Variables to be tested First Variable Continuous Continuous Continuous Continuous Second Variable Dichotomous (Unpaired) Students t-test / TIndependent Test Appropriate Test of Significance g
Dichotomous (Paired) Paired t-test Nominal (Qualitative) Continuous ANOVA Pearson correlation coefficient Linear regression Mann Whitney U test M Whit t t
Ordinal O di l Ordinal
Dichotomous Di h t (Unpaired)
Which Test?
Characterization of Variables to be tested First Variable Ordinal Second Variable Ordinal Spearman correlation coefficient (rho) Kendall correlation coefficient (tau) (ta ) Group the continuous variable and calculate rho or tau or chisquare Chi-square or Fisher exact test McNemar chi-square test Chi-square test Chi-square test
3
Ordinal
Continuous
One sample t test (Ho:=6 mmol/L?) 6 l/L?) Comparing 2 means Independent t test (Ho:1=2) Comparing >2 means One way ANOVA (Ho:1=2=3) Comparing Pre-& Post- means Paired t test (Ho:difference=0)
Correlation (Ho:Rho=0) Simple linear regression C Comparing proportion ( i ti (association) i ti ) Chi-square test (Ho:P1=P2=.)
File name: Step 1 Use explore if normality should be checked (n<30) Step 2 Analyze Compare Means One-sample T Test.. Move the desired numerical variable(s) () into Test Variable (s) box Set desired Test value Ok
6
How to analyze.
Output 1: p
p = 0.000 (<0.001) There is significant different of mean age of respondents from 50 years old. The mean age of respondent was lower than 50 years old. We are 95% confidence that the different of mean i th l ti i b t 2 84 t 1 3
10
p = 0.000 (<0 001) 0 000 (<0.001) There is significant different of mean age of respondents from 50 years old. The mean age of respondent was lower than 50 years old. We are 95% confidence that the different of mean age in the population is between -2.84 to -1.3.
11
Step 1 Analyze Descriptive Statistics Crosstabs.. Move each categorical variable to row and column box Click statistics button and check the Chi-square option, and Continue Perhaps you may click cells button and check desired options, and Continue OK
12
13
14
15
16
Smoking * SGA Crosstabulation SGA Smoking No Passive Total Count % within Smoking Count % within Smoking Count % within Smoking g Normal 41 67.2% 67 42.9% 108 49.8% 9 8% SGA 20 32.8% 89 57.1% 109 50 % 50.2% Total 61 100.0% 156 100.0% 217 100.0% 00 0%
Chi-Square Tests Value 10.328b 9.380 9 380 10.488 df 1 1 1 Asymp. Sig. (2-sided) .001 .002 002 .001 Exact Sig. (2-sided) Exact Sig. (1-sided)
Pearson Chi-Square a Continuity Correction Likelihood Ratio Fisher's Exact Test Linear-by-Linear Association A i ti N of Valid Cases
.001
a. Computed only for a 2x2 table b. b 0 cells ( 0%) have expected count less than 5 The minimum expected count is 30 (.0%) 5. 30. 36.
17
Ini menunjukkan bahawa dikalangan perokok pasif, peratus SGA lebih tinggi iaitu 57.1% berbanding dengan yang tidak iaitu 32.8%. Dari jadual seterusnya, nilai chi square ialah 10.328 dan nilai p ialah 0.001. Maka terbukti ada hubungan antara perokok pasif dan kejadian SGA
18
Jadual 1: Jadual kontigensi menunjukkan hubungan antara risiko rokok dengan kejadian SGA.
SGA 20 89 109
41 67 108
Sekiranya da a jadua 2x2, ada nilai sel jangkaan yang Se a ya dalam jadual , a se ja g aa ya g kurang dari 5, maka nilai p dan nilai X2 yang dibaca ialah nilai p di baris CONTINUITY CORRECTION. Ianya adalah serupa seperti kiraan Yates Correction Tetapi Correction. sekiranya saiz sampel lebih kecil iaitu kurang dari 40, maka nilai yang dibaca ialah nilai p dan nilai 2 pada baris Fishers' Exact Test. Test
20
Chi-Square Tests Chi S T t Value 10.328b 9.380 10.488 10 488 df 1 1 1 Asymp. Sig. ( (2-sided) ) .001 .002 .001 001 Exact Sig. ( (2-sided) ) Exact Sig. ( (1-sided) )
Pearson Chi-Square a Continuity Correction Likelihood Ratio Fisher's Exact Test Linear-by-Linear Association N of Valid Cases
.001
a. Computed only for a 2x2 table b. 0 cells (.0%) have expected count less than 5. The minimum expected count is 30. 1 36.
21
File name: sga.sav Step 1 Use explore if normality should be checked (n<30) explore Step 2 Analyze Compare Means Independent Samples TT t M Test.. Move the desired numericall variable(s) iinto th d i d i i bl ( ) t Test Variable (s) box Move the categorical variable (which describes the 2 g ( groups) into p) Grouping Variable box Click Define groups button to define 2 groups then continue and Ok Ok
22
How t analyze. H to l
23
0= No SGA 1= SGA
24
Group Statistics SGA Normal SGA N 108 109 Mean 58.666 50.657 50 657 Std. Deviation 11.2302 10.3512 10 3512 Std. Error Mean 1.0806 .9915 9915
Independent Samples Test Levene's T t for L ' Test f Equality of Variances t-test for Equality of Means 95% Confidence Interval of the Difference Lower Upper 5.1193 5.1181 10.8984 10.8996
F Weight at first ANEqual variances assumed Equal variances not assumed t d .787
Sig. .376
t 5.463 5.461
df 215 213.251
Mean Std. Error Sig. (2-tailed) Difference Difference .000 .000 8.0089 8.0089 1.4660 1.4665
Levenes test result: As its P value is more than 0.05, variances of 2 groups are different. So that we can use equal variance assumed line result. If p<0.05 please use equal variance no assumed line result p<0 05 equal assumed result.
25
N 108 109
Ujian j
Ujian T t = 5.463
<0.0005
26
File name: sga-pair.sav Step 1 If we need to check normality (n<30), Step 2 Analyze Compare Means PairedSamples T Test.. Move the desired 2 numerical variable(s) into Paired Variables: Paired Variables: box then Ok
27
How to analyze.
28
Pair 1
hb2 hb3
Paired Samples Test Paired Differences 95% Confidence Interval of the I t l f th Difference Lower Upper -.5766 -.1177
Pair 1
hb2 - hb3
Mean -.3471
t -3.018
df 69
29
Kumpulan
Test
Wujud perbezaan paras hemoglobin sebelum dan selepas intervensi yang significant i i i ifi
30
31
File name: sga.sav Step 1 Use explore if normality should be checked (n<30) Step 2 Analyze Compare Means One way ANOVA.. Move the desired numerical variable(s) into Dependent list: box Move the categorical Dependent list: variable (which describes groups) into Factor box Click Options button and check Descriptive and Homogeneity-of-variance continue Homogeneity of variance option continue and Ok
32
Step 3 If ANOVA is significant, you should do Post-Hoc tests (Click Post Hoc button Select one of the post hoc tests e.g. Scheffe Continue Ok
33
How to analyze.
34
How to analyze.
35
Descriptives Birth weight 95% Confidence Interval for Mean Lower Bound Upper Bound 2.6955 2.8647 2.5035 2 5035 3.0252 3 0252 2.6757 3.0102 2.7193 2.8629 2.7191 2.8631 2.6339a 2.9483a BetweenComponent Variance
N Housewife Office work Field work Total Model 151 23 44 218 Fixed Effects Random Effects
-.00420
a. Warning: B t a W i Between-component variance is negative. It was replaced b 0 0 i computing thi random effects measure. t i i ti l d by 0.0 in ti this d ff t
ANOVA Birth weight Sum of Squares .153 62.550 62.703 df 2 215 217 Mean Square .077 .291 F .263 Sig. .769
Tidak wujud perbezaan bermakna diantara jenis pekerjaan dengan berat kelahiran bayi. y Jika wujud, maka kita kena lihat kumpulan mana satu melalui post-hoc LSD
36
Post-hoc LSD P th
Multiple Comparisons Dependent Variable: Birth weight LSD Mean Difference (I-J) .01572 -.06289 06289 -.01572 -.07861 .06289 .07861
(J) Type of work Office work Field work Housewife Field work Housewife Office work
95% Confidence Interval Lower Bound Upper Bound -.2222 .2537 -.2450 2450 .1192 1192 -.2537 .2222 -.3522 .1949 -.1192 .2450 -.1949 .3522
37
Ujian
38
Does 2 variables assoc a ed? oes a ab es associated? Direction (-ve/+ve)? How strong?
r>0.75 r>0 75 very good/perfect correlation r>0.50 - <0.75 moderate/good l ti correlation r>0.25 - <0.50 fair correlation r<0.25 (little or no correlation)
39
File name: recall score Step 1 Graphs Scatter Simple Move 2 Scatter variables into Y axis (Dependent*) and X axis (Independent ) (Independent*) Ok Ok [*If there is a direction of relationship] Step 1 Analyze Correlate Bivariate Move 2 variables into Variables: box Check Pearson or Spearman Ok
40
How to analyze.
blood cholestrol level in mmol/l m
10
3 10 20 30 40 50 60 70
4 -There is a linear relationship between 2 variables. Positive -Positive correlation -If diet score increase, blood cholesterol level will increase.
41
How to analyze.
1 2
42
Output 5:
P-value r
We conclude that in the population, there is a linear correlation between diet score and blood cholesterol level (p<0.001). Our sample suggests that there is a good positive linear correlation between diet score and blood cholesterol level (r=0.666). It means that, if the diet score is increased, the blood cholesterol level will be increased. h l t l l l ill b i d
43
We conclude that in the population, there is a linear correlation between diet score and blood cholesterol level (p<0.001). Our sample suggests that there is a good positive linear correlation between diet score and blood cholesterol level (r=0.666). It means that, if the diet score is increased, the blood that increased cholesterol level will be increased.
44
Does 2 variables associated? Direction (-ve/+ve)? ( ve/+ve)? How strong? Strength of association
45
File name: recall score Step 1 As above Step 1 Analyze Regression Linear Move 2 variables into Regression Dependent and Independent boxes Click the Statistics button Check Confidence Intervals Continue Ok
46
How to
10
3 10 20 30 40 50 60 70
4 6
47
How to analyze.
It is linear and probably both normality & equal variance assumptions are satisfied q p
48
How to analyze.
2 1
3 4
49
Output 7: p
50
We conclude that in the population, there is a linear correlation between diet score and blood cholesterol level (p<0.001). Our sample suggests that the linear relationship can be interpreted as.. Blood cholesterol level=3.25 + (0.074*diet score). It means that if the diet scores higher by 100 units, the blood cholesterol level will be increased by 7 4 units. i d b 7.4 it We are 95% sure that the population beta will lie b t ill li between 0.062 and 0.085. 0 062 d 0 085
51
We conclude that in the population, there is population a linear correlation between diet score and b ood c o es e o e e (p<0.001). blood cholesterol level (p 0.00 ). Our sample suggests that the linear relationship can be interpreted as as.. Blood cholesterol level=3.25 + (0.074*diet score). score) It means that if the diet scores higher by 100 units, units the blood cholesterol level will be increased by 7.4 units. W are 95% sure that the population beta We th t th l ti b t will lie between 0.062 and 0.085.
52
There is a significant linear relationship between diet inventory index and cholesterol level (p<.001). Those with 1 unit more in the index, have cholesterol level higher for 0.39 mmol/L (95% CI: 0.29, 0.50 mmol/L) 0 29 0 50 mmol/L). With the 3 significant variables, the model explains 69% of variables variation of the blood cholesterol level in the sample (R2=0.69)
54
Thank you y