© Springer International Publishing Switzerland 2016
Ton J. Cleophas and Aeilko H. ZwindermanSPSS for Starters and 2nd Levelers10.1007/978-3-319-20600-4_27

27. Monte Carlo Tests for Continuous Data (10 and 20 Patients)

Ton J. Cleophas1, 2  and Aeilko H. Zwinderman2, 3
(1)
Department Medicine, Albert Schweitzer Hospital, Dordrecht, The Netherlands
(2)
European College Pharmaceutical Medicine, Lyon, France
(3)
Department Biostatistics, Academic Medical Center, Amsterdam, The Netherlands
 

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

A211753_2_En_27_Figa_HTML.gif

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
outcome = hours of sleep after treatment

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
   
aHours of sleep < hours of sleep
bHours of sleep > hours of sleep
cHours of sleep = hours of sleep
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
aWilcoxon Signed ranks test
bBased on 10,000 sampled tables with starting seed 2,000,000
cBased on positive ranks
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

A211753_2_En_27_Figb_HTML.gif

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 group variable has 0 for placebo group, 1 for sleeping pill group
Outcome variable = hours of sleep after treatment
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
aGrouping variable: group
bNote corrected for ties
cBased on 10,000 sampled tables with starting seed 2,000,000
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.
SPSS for Starters and 2nd Levelers
ACoverHTML.html
A211753_2_En_BookFrontmatter_OnlinePDF.html
A211753_2_En_1_ChapterPart1.html
A211753_2_En_1_Chapter.html
A211753_2_En_2_Chapter.html
A211753_2_En_3_Chapter.html
A211753_2_En_4_Chapter.html
A211753_2_En_5_Chapter.html
A211753_2_En_6_Chapter.html
A211753_2_En_7_Chapter.html
A211753_2_En_8_Chapter.html
A211753_2_En_9_Chapter.html
A211753_2_En_10_Chapter.html
A211753_2_En_11_Chapter.html
A211753_2_En_12_Chapter.html
A211753_2_En_13_Chapter.html
A211753_2_En_14_Chapter.html
A211753_2_En_15_Chapter.html
A211753_2_En_16_Chapter.html
A211753_2_En_17_Chapter.html
A211753_2_En_18_Chapter.html
A211753_2_En_19_Chapter.html
A211753_2_En_20_Chapter.html
A211753_2_En_21_Chapter.html
A211753_2_En_22_Chapter.html
A211753_2_En_23_Chapter.html
A211753_2_En_24_Chapter.html
A211753_2_En_25_Chapter.html
A211753_2_En_26_Chapter.html
A211753_2_En_27_Chapter.html
A211753_2_En_28_Chapter.html
A211753_2_En_29_Chapter.html
A211753_2_En_30_Chapter.html
A211753_2_En_31_Chapter.html
A211753_2_En_32_Chapter.html
A211753_2_En_33_Chapter.html
A211753_2_En_34_ChapterPart2.html
A211753_2_En_34_Chapter.html
A211753_2_En_35_Chapter.html
A211753_2_En_36_Chapter.html
A211753_2_En_37_Chapter.html
A211753_2_En_38_Chapter.html
A211753_2_En_39_Chapter.html
A211753_2_En_40_Chapter.html
A211753_2_En_41_Chapter.html
A211753_2_En_42_Chapter.html
A211753_2_En_43_Chapter.html
A211753_2_En_44_Chapter.html
A211753_2_En_45_Chapter.html
A211753_2_En_46_Chapter.html
A211753_2_En_47_Chapter.html
A211753_2_En_48_Chapter.html
A211753_2_En_49_Chapter.html
A211753_2_En_50_Chapter.html
A211753_2_En_51_Chapter.html
A211753_2_En_52_Chapter.html
A211753_2_En_53_Chapter.html
A211753_2_En_54_Chapter.html
A211753_2_En_55_ChapterPart3.html
A211753_2_En_55_Chapter.html
A211753_2_En_56_Chapter.html
A211753_2_En_57_Chapter.html
A211753_2_En_58_Chapter.html
A211753_2_En_59_Chapter.html
A211753_2_En_60_Chapter.html
A211753_2_En_BookBackmatter_OnlinePDF.html