Professional Documents
Culture Documents
asp
Clarke KR (1993) Non-parametric multivariate analyses of changes in community structure. Aust J
Ecol 18:117-43.
Non-Parametric Data Analysis Techniques for Biological Students
1
Analysis of similarity is a robust non-parametric test that was proposed by Clarke & Green
(1988). ANOSIM is widely used in the field of ecology where assumptions underlying in
univariate or multivariate parametric tests are often violated.
Purpose
ANOSIM is used to determine whether there are statistically significant difference between two
or more groups.
This is similar to ANOVA. Here instead of using raw data in ANOVA, use a ranked
dissimilarity matrix by converting distances into rank. Here comparing distances between groups
with distances within groups.
ANOSIM is a non-parametric multivariate technique which was design for multiple response
variables while Kruskal Wallis and Mann-Whitney U were designed for single response variable.
r B−r W
R=
M
2
r B=¿ Average of rank similarities of pairs of samples from different groups
r W =¿Average of rank similarities of pairs among replicates within group
n( n−1)
M= where n is the number of samples.
2
Interpretation of R
R is constrained between −1 (if all the lowest ranks are between groups) to +1 (If all the lowest
ranks are within groups). Positive values of R reflects more similarity within groups. That means
the grouping variable is important. The negative R values represent more similarities between
groups. The R values which is close to zero indicates that no difference between treatment and
within treatment similarities.
An R value close to “1.0” suggests dissimilarity between groups while an R value close to “0”
suggests an even distribution of high and low ranks within and between groups”
Working example
Manual calculation
2
S12 S2
S11 S13 S21 S22
3
S1 0
1
S1
0.5 0
2
S1 0.8
0.7 0
3 5
S2 1.0 1.0 1.0
0
1 6 5 5
S2 06 0.9 0
0.7 0.4
2 7 5
S2 0.5 0.6 0.6 0.9 0.3
0
3 6 5 4 6 2
S1 S12 S2 S2 S2
S13
1 1 2 3
S1
1
S1
3
2
S1
10 8.5
3
S2 13. 13.
15
1 5 5
S2
7 8.5 2 11
2
S2
4 6 5 12 1
3
r B= ( 15+13.5+ 13.5+7+8.5+
9 )= 9 =8.28
2+ 4+ 6+5 74.5
3
8.28−7.58
R= =0.093
15
2
The value of the R is 0.1. That means it is close to zero. It indicates no difference between
groups and within group similarities. We can conclude that group variable is not an important
variable.
4
3. Anderson–Darling test: tests whether a sample is drawn from a given distribution
The Anderson–Darling test is a statistical test of whether or not a given sample of data is drawn
from a certain probability distribution. As an example the normal distribution.
The test calculates the Anderson-Darling statistic
2
A =−n−S
n
1
S= ∑ ( 2i−1 ) [ ln F ( X i ) + ln (1−F ( X n −i +1 )) ]
n i=1
Wheren =sample size F ( X )=¿ cumulative distribution function of the specified distribution i=ith
sample when data is sorted in asending order.
Example
5
4. Non-parametric bootstrap method: estimates the accuracy/sampling distribution of a statistic
Bootstrap is a method of estimating the variance of an estimator to find out the confidence
interval. It’s a resampling procedure that uses data from one sample to generate a sampling
distribution by repeatedly taking random samples from the known sample, with replacement.
6
5. Cochran's Q: tests whether k treatments in randomized block designs with 0/1 outcomes
have identical effects
Cochran’s Q test is a non-parametric statistical test which is used for testing k =2 or more related
samples where the response variable is binary. Cochran’s Q is a special case of non-parametric
Friedman test. Friedman test is also used to detect differences among related samples with
numerical responses. When the response is binary Friedman test equals to Cochran’s Q test.
7
6. Cohen's kappa (k)
Cohen’s kappa is a non-parametric statistical test to quantify the level of agreement between two
raters or reliability between two raters where the variable measured is in categorical or nominal
scale. Not only can the reliability between two raters, Kohen’s Kappa also be used when same
rater makes the measurement at two different times.
P o−Pe
k=
1−Pe
Where Pe is the hypothetical probability of the two raters randomly match their choices and Po
is the observed probability that both raters are making the same choice.
Example:
Two dietitians (A and B) rated randomly selected 50 students in a rural school of their nutrient
status. If students are having daily requirement of nutrition they are categorized as normal and if
students couldn’t meet the requirement they are categorized as undernutrition.
The categorization was done after having a five minute discussion with each student. The data
obtained is given in the table below.
Manual calculation of k
8
The summary of the evaluations of raters A and B is given in the below contingency table.
Rater B
Normal Undernutrition
Normal 18 7 25
Rater A
Undernutrition 5 20 25
23 27 50
18 20 38
+ = =0.76
50 50 50
Calculation of Pe
Probability of both raters randomly diagnosing nutrient status of students are “Normal”:
25
∗23
50 575
= =0.23
50 2500
25
∗27
50 675
= =0.27
50 2500
0.23+ 0.27=0.5
0.76−0.5
k= =0.52
1−0.5
9
The table of Landis & Koch (1977) can be used as a guide.
Kapp Level of
a Agreement
>0.8 Almost Perfect
>0.6 Substantial
>0.4 Moderate
>0.2 Fair
0-0.2 Slight
<0 Poor
The calculated Cohen’s kappa indicates that the raters A and B are having moderate
reliability or agreement.
10
3. Click on “Crosstabs”
11
4. Add Rater 1 to Row(s) and Rater 2 to Column(s)
5. Click on Statistics
12
6. Select “Kappa” and click continue
13
9. You will obtain the following Output
The cross tabulation table generated by SPSS is cell counts of the categories of two raters.
The Symmetric Measures table presents the Cohen’s kappa and it is 0.52 indicating a moderate level of
agreement between two raters. Furthermore, since the P is less than 0.05 , Kappa coefficient is
significantly different from zero.
Symmetric Measures
Asymptotic Approximate
a b
Value Standard Error Approximate T Significance
Measure of Agreement Kappa .520 .120 3.689 .000
N of Valid Cases 50
a. Not assuming the null hypothesis.
b. Using the asymptotic standard error assuming the null hypothesis.
14
7. Weighted Cohen’s kappa
Weighted Cohen’s kappa is used to quantify the level of agreement between two raters when the
variable measured in ordinal scale.
15
8. Friedman two-way analysis of variance
The Friedman test is a non-parametric statistical test for analyzing randomized complete block
designs when response variable is measured in ordinal scale or ratio scaled response variable is
not normally distributed. Friedman test is an extension of the sign test where there are more than
two treatments.
[ ]
k
12
FR= ∑
nk (k +1) i=1
2
R i −30 ( k +1 )
Where n=number of observations per treatment, k = number of treatments, R2i =sum of each
squared observation in ith treatment.
Example
Suppose a researcher wants to know the best flavored yoghurt out of the three types of flavors he
has added to yoghurt i.e. Carrot, Mango and Guava in terms of consumer preference. She
selected randomly 10 consumers and recorded their preference to all three flavors.
(do not prefer = 1, slightly not prefer = 2, neutral = 3, slightly prefer =4, highly prefer = 5)
Consume
r Carrot Mango Guava
1 1 3 4
2 2 4 2
3 4 4 2
4 1 4 3
5 1 3 4
6 1 4 3
7 3 5 1
8 4 4 4
9 3 5 1
10 4 4 3
16
2. Select “Analyze” “Nonparametric Tests” “Legacy dialogs” “K Related Samples”
3. Select the treatment variable columns as “Test Variables” and select “Friedman” as “Test
Type”.
17
4. Then Click “OK”.
5.
6. Following output is obtained
Ranks
Mean Rank
Carrot 1.65
Mango 2.60
Guava 1.75
Test Statisticsa
N 10
Chi-Square 6.606
18
df 2
Asymp. Sig. .037
a. Friedman Test
19
9. Empirical Likelihood Ratio Test
Survival Rate: Suppose a researcher wants to find the survival time of following a dietary plan
by group of people, the start time is the point where individu
Example
Click Analyze.
Click on Kaplan-Meier.
Click on the arrow button to move the variable into the Time: box.
Click on the arrow button to move the variable into the Status: box.
In the Single value: box, enter the value or "level" of the dichotomous categorical outcome
variable that denotes the event has occurred. Example: "1"
Click Continue.
20
Click on the arrow button to move the variable into the Factor: box.
Click Continue.
Click Continue.
Click OK.
21
14. Kruskal–Wallis one-way analysis of variance
by ranks: tests whether > 2 independent samples are drawn from the same distribution.
Example
Suppose a researcher wanted to find out which aesthetic medium out of music, dancing and
painting is best medium to alleviate depression status of students in an orphanage. She
selected 30 depressed students and randomly assigned into three groups. Each group consists
of 10 students. The researcher ensured that all 30 students have same level of depression.
One group listened music for 30 min once in three days, the second group was allowed to
participate for a dancing session of 30 min once in three days and third group was
participated in painting session of 30 min once in three days. The experiment was conducted
for a period of one month. At the end of the month each participant was asked to rate how
they feel depression into a 1-10 likert scale. One is fully depressed and 10 is fullest happy.
The data received is given in the table below.
22
2. Go to “Analyze” “Nonparametric Test” “Legacy Dialogs” “K Independent
Samples”
3. Select “Score” as the test variable, select “Aesthetic Medium” as the grouping variable and
select “Kruskal-Wallis H” as the “Test Type”.
23
4. Click “Define Range…” and enter the minimum value (1) as well as the maximum value (3)
24
5. Click “Continue” and then click “Ok”.
Ranks
Aesthetic_Medium N Mean Rank
Scores Music 10 19.20
Dancing 10 9.50
Painting 10 17.80
Total 30
25
Test Statisticsa,b
Scores
Kruskal-Wallis H 7.247
df 2
Asymp. Sig. .027
a. Kruskal Wallis Test
b. Grouping Variable:
Aesthetic_Medium
26
15. Kuiper's test: tests whether a sample is drawn from a given distribution, sensitive
to cyclic variations such as day of the week.
16. Logrank test: compares survival distributions of two right-skewed, censored
samples.
27
17. Mann–Whitney U
or Wilcoxon rank sum test: tests whether two samples are drawn from the same distribution,
as compared to a given alternative hypothesis.
Example
A trial is run to assess the effectiveness of two types of therapy programs on reducing
academic stress of undergraduate students. 12 undergraduates who are suffering from stress
condition were selected and randomly grouped into two of six members each. One group
involved in a forest therapy program one hour per week for a period of one month. The
second group involved in a yoga program for a period of one month at the frequency of one
hour per week. At the end of the month students were asked to rank their level of stress into a
0 to 10 likert scale (Extremely stressful = 0 moderately stressful = 5 not at all stressful = 10).
Forest
Yoga
Therapy
6 2
8 2
6 4
6 5
4 5
7 4
28
3. Select the variable “Stress Level” into the “Test Variable List” box and select the “Therapy”
variable into the “Grouping Variable” box
29
4. Click “Define Groups…” and enter the group variable values (1 and 2) for identifying groups
to be compared.
5. Click “Continue”
30
6. Select “Mann-Whitney” as the “Test Type” and then Click “OK”
Ranks
Therapy N Mean Rank Sum of Ranks
Stress_Level Forest Therapy 6 9.00 54.00
Yoga 6 4.00 24.00
Total 12
Test Statisticsa
Stress_Level
Mann-Whitney U 3.000
Wilcoxon W 24.000
Z -2.445
Asymp. Sig. (2-tailed) .014
Exact Sig. [2*(1-tailed Sig.)] .015b
a. Grouping Variable: Therapy
b. Not corrected for ties.
32
24. Spearman's rank correlation coefficient
: measures statistical dependence between two variables using a monotonic function.
Example
33
25. Squared ranks test: tests equality of variances in two or more samples.
26. Tukey–Duckworth test: tests equality of two distributions by using ranks.
27. Wald–Wolfowitz runs test: tests whether the elements of a sequence are mutually
independent/random.
28. Wilcoxon signed-rank test: tests whether matched pair samples are drawn from
populations with different mean ranks.
29. Quantile regression analysis (For a second example, consider a
different researcher who wants to know whether average hours of sleep
is linked to how frequently one falls ill. Because many people get sick
rarely, if at all, and occasional others get sick far more often than most
others, the distribution of illness frequency is clearly non-normal, being
right-skewed and outlier-prone. Thus, rather than use a method that
assumes a normal distribution for illness frequency, as is done in
classical regression analysis, for example, the researcher decides to
use a nonparametric method such as quantile regression analysis. )
34