Docsity

Module 4 - Continuous Data Computation, Summaries of Biostatistics

Toggle sidebar
bg1
Week
4 -
Continuous
Data
Computation
(
Performing
Test
-
Independent
T
-
test
,
Mann
-
Whitney
U
test
,
Paired
T
-
test
,
Wilcoxon
Signed
Rank
Test
)
Prelude
-
Run
R
commander
and
Load
the
Dataset
First
and
foremost
,
we
have
to
launch
the
R
commander
software
to
do
biostatistical
test
Launch
R
studio
→
Type
“
library
(
Rcmdr
)
in
R
console
tab
→
wait
for
R
commander
to
launch
Launch
EZR
R
commander
plug
in
:
Tools
→
Load
Rcmdr
plugin
(
s
)
→
Choose
EZR
plugin
→
restart
R
commander
In
order
for
the
R
commander
software
to
have
data
to
work
on
,
we
have
to
load
the
data
to
the
R
commander
:
File
→
import
data
read
text
data
from
(
your
desired
file
type
)
→
Rename
the
dataset
accordingly
→
locate
the
file
in
the
explorer
→
double
-
click
to
load
the
data
on
explorer
Check
whether
the
dataset
is
properly
load
:
Click
view
dataset
→
review
whether
your
dataset
has
been
appropriately
sorted
and
presented
Now
,
you
are
ready
to
go
!
1.
Test
for
Distribution
Week 4 - Continuous Data Computation (Performing Test - Independent T-test, Mann-Whitney U test, Paired T-test, Wilcoxon Signed Rank Test)
1
pf3
pf4
pf5

Partial preview of the text

Download Module 4 - Continuous Data Computation and more Summaries Biostatistics in PDF only on Docsity!

Week 4 - Continuous Data

Computation (Performing Test -

Independent T-test, Mann-

Whitney U test, Paired T-test,

Wilcoxon Signed Rank Test)

Prelude - Run R commander and Load the Dataset

First and foremost, we have to launch the R commander software to do biostatistical test Launch R studio → Type “library(Rcmdr) in R console tab → wait for R commander to launch Launch EZR R commander plug in: Tools → Load Rcmdr plugin(s) → Choose EZR plugin → restart R commander In order for the R commander software to have data to work on, we have to load the data to the R commander: File → import data read text data from (your desired file type) → Rename the dataset accordingly → locate the file in the explorer→ double-click to load the data on explorer Check whether the dataset is properly load: Click view dataset → review whether your dataset has been appropriately sorted and presented Now, you are ready to go!

1. Test for Distribution

(Only for numerical (continuous) data) - Before we can actually run the statistical test for the data, we need to check whether the data is normally distributed or not : Kolmogorov-Smirnov test → Sample 50 Shapiro-Wilk test → Sample ≤ 50 Method: Statistical analysis → Continuous variables → Kolmogorov-Smirnov test for normal distribution → Pick the desired variables → OK! Interpretation: The test above will detect whether the data is non-normally distributed or not → So we want the P-value to be large P value 0,05) in order to prove that it is normally distributed: P value 0,05 → Non-significant result = Data normally distributed P value 0,05 → Significant result = Data non-normally distributed

1.a. Log Transforming Non-Normal Data

When the data presented is not normal → There are multiple mathematical computation that can be done to compensate the for non-normally distributed data in order for it to be normal → Log transformation (one of the common method) = Log functioning all of the variables number that are non-normally distributed Indication: Non-normal data with positive skewness (present of data on extreme positive end) Method: Active data set → variables → create new variables → pick the desired variable → Name the new variable (e.g. Loge.”name of the variable”) → Type “log(”name of the variable”) on expression to compute section → OK! Check the result of the newly log functioned variables on view data set → scroll to the most right of the table

Choose the desired variables on responsible variable tab and Pick based on what the groups is based on (control vs intervention) Note: To know what to pick on the group section → Look at the data set and see what is the name of column which determines the control and intervention group Extra: Understanding Wilcoxon Rank-Sum Test & Wilcoxon Signed-Rank Test Both of these non-parametric test shares a common mechanism in dealing with the statistical computation → Ranking the variables in order Below is the explanation how each statistical computation happens in the background:

A. Wilcoxon Rank-Sum Test (Mann-Whitney U Test)

Dataset: The data below is used as an example! Group A 1, 2, 4, 13, 15 Group B 12, 14, 17, 20, 22 Combine both group variables and rank them according to the value of the variable with the lowest value being ranked first and the highest value ranked last Example: Combine both group variables → 1, 2, 4, 6, 13, 12, 14, 17, 20, 22 Rank them from lowest to highest: Group Value of Variables Rank 0 1 1 0 2 2 0 4 3 0 13 5 0 15 6

Group Value of Variables Rank 1 12 4 1 14 7 1 17 8 1 20 9 1 22 10 Sum the rank based on group Example: Group A → 1 2 3 5 6 17 Group B → 4 7 8 9 10 38 Difference of rank sum between group → 38 17 21 Note: If there happen to be a same rank between value → sum the rank of the two variables and divide by 2, then add the result to the respective group of rank sum The statistical computation will then decide whether a 21 points different in rank sum is statistically significant or not → statistical software will automatically adjust the sample size difference within group if present As you can see, the name Wilcoxon “Rank-sum” test stems from the fact that we judged the significancy through the sum of the rank in each group

B. Wilcoxon Signed-Rank Test

Dataset: The data below is used as an example! Group A 6, 4, 2, 3, 5 Group B 3, 1, 2, 5, 8 Combine both group variables and rank them according to the absolute value (i.e. omit the negative / positive value of the number) of the variable with the lowest value being ranked first and the highest value ranked last Example: Combine both group variables → 1, 2, 4, 6, 13, 12, 14, 17, 20, 22

The statistical computation will then decide whether a 9 points different in rank sum is statistically significant or not → statistical software will automatically adjust the sample size difference within group if present As you can see, the name Wilcoxon “Signed-rank” test stems from the fact that we judged the significancy through the sum from each rank based on the sign of the value of variables