1 General Purpose
Monte Carlo methods allows you to
examine complex data more easily than advanced mathematics like
integrals and matrix algebra. It uses random numbers from your own
study rather than assumed Gaussian curves. For continuous data a
special type of Monte Carlo method is used called bootstrap which
is based on random sampling from your own data with
replacement.
2 Schematic Overview of Type of Data File, Paired Data

3 Primary Scientific Question, Paired Data
For paired data the paired t-test and
the Wilcoxon test are appropriate (Chap. 3). Does Monte Carlo analysis of the
same data provide better sensitivity of testing.
4 Data Example, Paired Data
The underneath study assesses whether
some sleeping pill is more efficaceous than a placebo. The hours of
sleep is the outcome value. This example was also used in the Chap.
2.
Outcome 1
|
Outcome 2
|
6,1
|
5,2
|
7,0
|
7,9
|
8,2
|
3,9
|
7,6
|
4,7
|
6,5
|
5,3
|
8,4
|
5,4
|
6,9
|
4,2
|
6,7
|
6,1
|
7,4
|
3,8
|
5,8
|
6,3
|
5 Analysis: Monte Carlo (Bootstraps), Paired Data
The data file is in extras.springer.com
and is entitled “chapter2pairedcontinuous”. Open it in SPSS. For
analysis the statistical model Two Related Samples in the module
Nonparametric Tests is required.
Command:
-
Analyze....Nonparametric Tests....Legacy Dialogs....Two-Related-Samples....Test Pairs:....Pair 1: Variable 1 enter hoursofsleepone....Variable 2 enter hoursofsleeptwo....mark Wilcoxon....click Exact....mark Monte Carlo....set Confidence Intervals: 99 %....set Numbers of Samples: 10000....click Continue....click OK.
Rank
N
|
Mean rank
|
Sum of rank
|
||
---|---|---|---|---|
Hours of sleep-hours of sleep
|
Negative ranks
|
8a
|
6,31
|
50,50
|
Positive ranks
|
2b
|
2,25
|
4,50
|
|
Tiles
|
0c
|
|||
Total
|
10
|
Test statisticsa, b
Hours of sleep – hours of sleep
|
|||
---|---|---|---|
Z
|
−2,346c
|
||
Asymp. Sig. (2-tailed)
|
,019
|
||
Monte Carlo Sig. (2-tailed)
|
Sig.
|
,015
|
|
99 % confidence interval
|
Lower bound
|
,012
|
|
Upper bound
|
,018
|
||
Monte Carlo Sig. (1-tailed)
|
Sig.
|
,007
|
|
99 % confidence interval
|
Lower bound
|
,005
|
|
Upper bound
|
,009
|
The above tables are in the output
sheets. The Monte Carlo analysis of the paired continuous data
produced a two-sided p-value of 0,015. This is a bit better than
that of the two-sided Wilcoxon (p = 0,019).
6 Schematic Overview of Type of Data File, Unpaired Data

7 Primary Scientific Question, Unpaired Data
Unpaired t-tests and Mann-Whitney
tests are for comparing two parallel-groups, and use a binary
predictor, for the purpose, for example an active treatment and a
placebo (Chap. 4). They can only include a single
predictor variable. Does Monte Carlo analysis of the same data
provide better sensitivity of testing.
8 Data Example, Unpaired Data
We will use the same example as that
of the Chap. 4. In a parallel-group study of 20
patients 10 are treated with a sleeping pill, 10 with a placebo.
The first 11 patients of the 20 patient data file is given
underneath.
Outcome
|
Group
|
6,00
|
,00
|
7,10
|
,00
|
8,10
|
,00
|
7,50
|
,00
|
6,40
|
,00
|
7,90
|
,00
|
6,80
|
,00
|
6,60
|
,00
|
7,30
|
,00
|
5,60
|
,00
|
5,10
|
1,00
|
The data file is entitled
“chapter4unpairedcontinuous”, and is in extras.springer.com. Start
by opening the data file in SPSS.
9 Analysis: Monte Carlo (Bootstraps), Unpaired Data
For analysis the statistical model Two
Independent Samples in the module Nonparametric Tests is
required.
Command:
-
Analyze....Nonparametric Tests....Legacy Dialogs....Two-Independent Samples Test....Test Variable List: enter effect treatment....Grouping Variable: enter group....mark Mann-Whitney U....Group 1: 0....Group 2: 1....click Exact....mark Monte Carlo....set Confidence Intervals: 99 %....set Numbers of Samples:10000....click Continue....click OK.
Ranks
Group
|
N
|
Mean rank
|
Sum of ranks
|
|
---|---|---|---|---|
Effect treatment
|
,00
|
10
|
14,25
|
142,50
|
1,00
|
10
|
6,75
|
67,50
|
|
Total
|
20
|
Test statisticsa
Effect treatment
|
|||
---|---|---|---|
Mann-Whitney U
|
12,500
|
||
Wilcoxon W
|
67,500
|
||
Z
|
−2,836
|
||
Asymp. Sig. (2-tailed)
|
,005
|
||
Exact Sig. [2*(1-tailed Sig.)]
|
,003b
|
||
Monte Carlo Sig. (2-tailed)
|
Sig.
|
,002c
|
|
99 % confidence interval
|
Lower bound
|
,001
|
|
Upper bound
|
,003
|
||
Monte Carlo Sig. (1-tailed)
|
Sig.
|
,001b
|
|
99 % confidence interval
|
Lower bound
|
,000
|
|
Upper bound
|
,002
|
The above Monte Carlo method produced
a two-sided p-value of p = 0,002, while the Mann-Whitney test
produced a two-sided p-value of only 0,005. Monte Carlo analysis
was, thus, again a bit better sensitive than traditional testing
(Chap. 5).
10 Conclusion
Monte Carlo methods allow you to
examine complex data more easily and more rapidly than advanced
mathematics like integrals and matrix algebra. It uses random
numbers from your own study. For continuous data a special type of
Monte Carlo method is used called bootstrap which is based on
random sampling from your own data with replacement. Examples are
given.
11 Note
More background, theoretical, and
mathematical information of Monte Carlo methods for data analysis
is given in Statistics applied to clinical studies 5th edition,
Chap. 57, Springer Heidelberg Germany, 2012, from the same
authors.