Nonparametric Test: DR - Dr. Siswanto, MSC
Nonparametric Test: DR - Dr. Siswanto, MSC
Nonparametric Test: DR - Dr. Siswanto, MSC
FACULTY OF MEDICINE
UNIVERSITY OF BRAWIJAYA
1
INTRODUCTION
2
A variable is a
characteristic of the
thing you are studying
or observing
Length of …
Weight of …
Variables are characteristics
that can be measured or Number of … Amount of …
categorized 3
What is the variable
if you are studying
the birth weight of
dolphins?
birthweight
Dolphins are
the subjects
20 4
Ratio
Numeric
Interval
Variable
Scale
Nominal
Categorical
Ordinal
Nominal variable
6
Nominal variable
7
Ordinal variable
8
Ordinal variable
10
Level of measurement
• Higher level variables can always be expressed at a
lower level, but the reverse is not true.
• For example, Body Mass Index (BMI) is typically
measured at an interval-level such as 23.4.
– BMI can be collapsed into lower-level Ordinal
categories such as: (ordinal)
• >30: Obese
• 25-29.9: Overweight
• <25: Underweight
12
PARAMETRIC TEST
14
CHI SQUARE
The chi-squared test is usually used to compare
multiple groups where the independent variable
and the dependent variable are binary
(nominal/qualitative/categorical data)
This test is very well illustrated with an example of
a 2X2 table of data comparing 2 groups, one
receiving a treatment and the other not, and 2
outcomes of cure versus continued disease (not
cured)
Yes No
Total 22 21 43
16
FISHER EXACT TEST
18
LUNG CA + LUNG CA -
SMOKER a+b
a b
c d
NONSMOKER
c+d
a+c b+d
19
How to calculate of expected frequency/outcomes
a = (a+c) X (a+b) / N
b = (b+d) X (b+a) / N
c = (c+a) X (c+d) / N
d = (d+c) X (d+b) / N
N = a+b+c+d
21
To carry out these two test, we proceed as follows:
22
Mann-Whitney Test for two independent samples: Number
of prenatal care visits for mothers bearing babies of low and
of normal birth weight
23
WILCOXON SIGNED-RANK TEST
25
KRUSKAL-WALLIS TEST
The Kruskal-Wallis Test is the nonparametric equivalent
of the one-way ANOVA.
This technique is an alternative to the one-way ANOVA
• three or more group
• the groups are independent
• the samples are selected are not normally distributed
• the sample do not have equal variances
• data scale is ordinal
26
To use the Kruskal-Wallis Test
• Combine the observation of the various groups
and arrange them in array from lowest to highest
• Assign ranks to each of the observations and
replace them in each of the groups ( if you start
with ordinal data, this conversion would not be
necessary
• The ranks are summed in each of the groups, and
the test statistic H is computed
27
Scores of three types of Ranks
teachers
28
SPEARMAN RANK CORRELATION
COEFFICIENT
The sample correlation coefficient, r, is a measure of the
strength of the linier association between two quantitative
variables ((Pearson’s product-moment r)
Spearman Correlation is a measure of the association
between two qualitative data (two rank variable/ordinal)
Like the Pearson product correlation coefficient, the
Spearman rank coefficient is calculated to determine how
well 2 variables for individual data points can predict each
other.
29
SPEARMAN RANK CORRELATION
COEFFICIENT
30
31
32
FRIEDMAN TEST
34
35
Multiple Logistic Regression
Logistic Regression is used to analyze the relationship
between two variables when the dependent variable is
binary . This differs from normal simple linear regression
where the dependent variable is a continuous numeric
variable. A simple logistic regression model is by
logit(pi) = log(pi / (1 pi)) = b0 + b1* xi
where
pi is the response to be modeled
b0 is the intercept parameter
b1 is the slope parameter
xi is an array of independent variables
36
Multiple Logistic Regression
Use multiple logistic regression when you have one
nominal and two or more measurement /independent
variables. The nominal variable is the dependent (Y)
variable; you are studying the effect that the independent
(X) variables have on the probability of obtaining a
particular value of the dependent variable. For example,
you might want to know the effect that blood pressure, age,
and weight have on the probability that a person will have
a heart attack in the next year.
37
Multiple Logistic Regression
Multiple Logis
ln[Y/(1−Y)]=a+b1X1+b2X2+b3X3...
38
CONTOH
Penelitian untuk mengetahui faktor
prediktor terjadinya syok pada penderita
demam berdarah. Adapun faktor prediktor
yang akan diteliti meliputi : jenis kelamin,
perdarahan, trombosit, hematokrit dan
hepatomegali
39
Example
Penelitian untuk mengetahui faktor
prediktor terjadinya syok pada penderita
demam berdarah. Adapun faktor prediktor
yang akan diteliti meliputi : jenis kelamin,
perdarahan, trombosit, hematokrit dan
hepatomegali
40
Research to determine the predictor factor
of shock in dengue fever patients. The
predictor factors to be studied include: sex,
bleeding, thrombocyte, hematocrit and
hepatomegaly
41
42
logit(pi) = log(pi / (1 pi)) = b0 + b1* xi
Y= Constanta + a1x1+a2x2+a3x3……+aix1
Y=1,538+1,189(perdarahan)+
1,233(hepatomegali)+1,137(hematokrit)
P= 1/(1+e-Y )
P=probabilitas
e= bilangan natural = 2,7
43
GOOD LUCK !
44