Professional Documents
Culture Documents
.
JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of
content in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new forms
of scholarship. For more information about JSTOR, please contact support@jstor.org.
Wiley and Royal Statistical Society are collaborating with JSTOR to digitize, preserve and extend access to
Journal of the Royal Statistical Society. Series C (Applied Statistics).
http://www.jstor.org
Appl.Statist.(1977),
SimpleMonteCarloTestsforSpatialPattern
By JULIANBESAG
and
PETERJ. DIGGLE
ofNewcastleuponTyne
University
of Durham
University
[ReceivedMarch1977. RevisedJune1977]
SUMMARY
is reviewedbriefly
The MonteCarlo approachto testinga simplenull hypothesis
spatialdistributions
and severalexamplesof its applicationto problemsinvolving
space-time
are presented.These includespatialpointpattern,patternsimilarity,
and scalesof pattern.The aim is notto presentspecific"recommended
interaction
at a
the value of the generalapproach,particularly
tests"but ratherto illustrate
stageofanalysis.
preliminary
DISTRIBUTIONS;
SPATLAL
MONTECARLOTESTS;RANDOMIZATION
Keywords:
TESTS;SPATIAL
TESTING
SIGNIFICANCE
OFPATTERN;
SCALES
INTERACTION;
PATTERN;SPACE-TIME
1. INTRODUCTION
consists
data,MonteCarlotesting
GIVENa simplenull hypothesisX and a setofrelevant
u amongst
teststatistic
a corresponding
setofvalues
ofranking
thevalueul ofa selected
simply
ofu. Whenthedistribution
fromthenulldistribution
ofu is
byrandomsampling
generated
u1amongst
teststatistic
thecompleteset of
therankoftheobserved
continuous,
effectively
values {uj: i = 1,...,m} determines an exact significance level for the test since, under
V',
m= 100,incontrast
withthemuchlargersample
be anticipated,
typically
thanmight
perhaps
ofu. Whenthe
function
ofthenulldistribution
forprecise
estimation
whichwouldberequired
so thattiesmayoccur,weadoptthepolicyofchoosing
the
ofu is rather
discrete,
distribution
level. In
mostconservative
rankingforu; thisprovidesan upperbound forthe significance
andwemustassumethat
sampling
is replacedbypseudo-random
randomsampling
practice,
as
We haveusedLehmer'smultiplicative
generator,
congruential
thisdeviceis satisfactory.
IBM 370/168
Universities'
machine.
on theNorthumbrian
bytheAPLSVsystem
implemented
by
investigated
by Barnard(1963)and subsequently
MonteCarlotestswereintroduced
mostpowerful
testsexisttheloss of power
Hope (1968),whoshowsthatwhenuniformly
maybeusedfor
slight.Thetechnique
theuseofa MonteCarlotestis relatively
from
resulting
onthe
simulations
canbeconditioned
thatthenecessary
provided
hypotheses
testing
composite
thisisseldom
forallnuisance
statistics
Unfortunately,
valuesofsufficient
parameters.
observed
innon-parametric
finds
a natural
application
feasible
andtheMonteCarloapproachtherefore
tests(Fisher,1935)appeardesirablebut
whenfullrandomization
situations,
particularly
1964,
Isolatedexamplesappearin psychology
(Edgington,
cumbersome.
computationally
seemsgenerally
in 1969)andingeography
andcorrected
(CliffandOrd,1973)butthemethod
is thatdifferent
investiobjection
tohavegainedfewadvocates.Weassumethattheprincipal
setsofdata,eveniftheyuse the
resultson equivalent
different
gatorsmayobtainsomewhat
as
thatsignificance
is rarely
to be treated
testing
sameteststatistic.
Againstthis,wecontend
and
further
hypotheses
itspurposebeingmoreusuallyas an aid insuggesting
an endinitself,
of objectivereporting,
we have onlycarriedout
data collection.In theinterests
relevant
a primary
stated.However,
advantage
singletestson eachsetofdata,exceptwhereotherwise
is freeto use a variety
ofinformative
statistics
is thattheinvestigator
ofMonteCarlotesting
to byknowndistribution
thanbe dictated
rather
theory.Indeed,even
ofhis ownchoosing,
327
APPLIED STATISTICS
328
is available,MonteCarlotesting
provides
distribution
theory
whentherelevant
asymptotic
forsmallsamples.
an exactalternative
ofsimpleMonteCarlotests.Ourinterest
somespatialillustrations
has
We nowdescribe
is onmore
beenstimulated
bytherecentworkof Ripley(1976,1977)in whichtheemphasis
two-dimensional
Markovpointprocesses.
particularly
concerning
sophisticated
applications,
rather
thanexact,tests
leadsto approximate,
parameters
In suchcases,theneedto estimate
totheestimation
can
whichis onlylooselyrelated
procedure
although
theuse ofa teststatistic
providea partialremedy.
2. TESTS OF SPATIALRANDOMNESS
foredge-effects
and thatno correction
is required,
shapeof regioncan be accommodated
on thelocationsofeventsneartheboundary
ofS may
somedegreeofconditioning
although
be desirable.
is suggested
Otherteststatistics
byBartlett
mayof coursebe adopted.One alternative
blackpinesaplingsin a 5*7metre
(1964)duringhisanalysisofthelocationsof65 Japanese
between
ofthedistance
function
thedistribution
evaluates
squareplot(Numata,1961).Bartlett
F(z)
1*000.75-
X-
0X50_
,w'0
0-25-
'
025
050
075.
1 00
to z = Fo(x), wherex
FIG. 1. Monte Carlo analysisof Numata's data. Abscissacorresponds
distanceand Fo(.) is thecorresponding
denotesinter-event
distribution
function
ofx undercomplete
functionof z. 0 data;
spatial randomness. Ordinatecorrespondsto empiricaldistribution
(z) = z.
envelopeof 99 randomsimulations;-----
MONTE
CARLO
PATTERN
329
chosenpointsina givensquareandusesthistocompare
theobserved
frequencies
tworandomly
withthoseexpected
on the
i-metre
intervals,
ofall inter-tree
distances,
groupedin successive
(Bartlett,
1964,Table 12). A formalX2 goodness-of-fit
basisofcomplete
spatialrandomness
but,as Bartlett
notes,
on 13degreesoffreedom
calculation
producesthevalue28,nominally
measurements
invalidates
the
thedependence
betweeninter-tree
witha commonend-point
an approximaandtheobviousconclusion.Indeed,Bartlett
presents
usualdistribution
theory
thatthevalueof28 is entirely
consistent
withthenullhypothesis.
tionwhichsuggests
99 simulations
of65 eventsrandomly
inthe
distributed
In ourinvestigation
weperformed
distances
ineach
distribution
function
ofthe2,080inter-event
square,calculated
theempirical
thevalue28 rankedcloseto the
99 further
valuesoftheX2 statistic:
caseandhenceobtained
of thetrees. More informatively,
mediangivingno reasonto doubtspatialrandomness
function
forthegrouped
dataandtheenvelope
ofthose
distribution
Fig. 1 showstheempirical
distribution
function
undercomplete
obtainedfromthesimulations
againstthetheoretical
oncemoreprovidesno reasonto rejectthenull
The globalagreement
spatialrandomness.
forthedetection
teststatistics
On theotherhand,different
wouldbe appropriate
hypothesis.
ofspecific
fromcomplete
spatialrandomness.
typesofdeparture
3. PATTERN TRANSFERENCE
withsome bird
Our secondapplicationof MonteCarlo testingarose in connection
themethodhas widerimplications.
Supposethatassociatedwith
migration
data,although
ofn labelledindividuals
arepointsXj andyi,herelocations
beforeand
theithofa population
setsoflocations.Defineul as anymeasureof
LetX and@Ybe thetwoordered
after
migration.
thetwosets,preferably
oneinvariant
undertranslation,
rotation
and scale
matching
between
of thesets. In ourexample,we chosethecorrelation
change,and also equalpermutations
setsofinter-point
distances.Finally,letU2,..., UM
thetwocorresponding
coefficient
between
between1andeachofm-1 random
ofmatching
calculated
bethesamemeasure
permutations
testofpattern
a conditional
ofMY.The rankoful thenprovides
transference,
giventhesets
8 andWY.Notethatthefullpermutation
testis prohibitive
evenforquitesmallvaluesofn.
ofBotany,LiverpoolUniversity,
to Mr M. NichollsoftheDepartment
We are grateful
intheBritish
of84blackbirds,
Islesduring
thewinter
months
fordataon thelocations
ringed
inNorthern
a subsequent
summer.Againusing99 simulations,
Europeduring
andrecovered
the100correlation
wefoundthatu1ranked93rdamongst
coefficients,
providing
onlylimited
ofpattern
be a
transference
(thatis,at the8 percentlevelusingwhatshouldclearly
evidence
one-sided
test).
overa 10-year
datahadbeencollected
periodanditwouldbe more
In fact,theblackbird
and
of birdswhichhad beenringedin a particular
winter
to considersub-groups
relevant
summer.Thelargestsuchsub-group
thefollowing
onlynine
recovered
(1967-68)comprised
at
birds,buttheabovetestwasappliedand,despitethepaucityofthedata,gavesignificance
is hardly
oflarge-scale
transference
the4 percentlevel.It is fairto saythatevidence
pattern
relevant
data are difficult
to
in thegeneralcontextof birdmigration,
although
unexpected
is ofgreater
ornithological
interest,
beingpertinent
obtain.Theanalogoussmall-scale
problem
traits
suchas alarmcalls(Trivers,
ofaltruistic
oftheheritability
tostudies
1971).Theexistence
suchas woods,maythenproduceimportant
differential
scale-effects.
of naturalboundaries,
versionoftheabovetest,possibly
basedon theVoronoi
a non-metric
If so, wewouldprefer
is described
whoseefficient
tesselation
computation
byGreenand Sibson(1977).
4. SPACE-TIME INTERACTION
330
APPLIED STATISTICS
on
ofpopulation.Clustering
incentres
tocluster
willshowa naturaltendency
spacelocations
inthe
factors,
suchas seasonalvariation.However,
external
reflect
maysimilarly
thetime-axis
in spaceandin timemaybe
whichproduceclustering
themechanisms
absenceofcontagion
to
thenullhypothesis
and it is on thisbasisthatwe consider
to actindependently
expected
interaction.
theabsenceofspace-time
represent
andtime
ofspaceadjacency
dueto Knox(1964),is to selectcriteria
Theusualprocedure,
u ofpairsofcaseswhichareadjacentbothin
thenumber
andtouseas teststatistic
adjacency
of this
to thenulldistribution
a Poissonapproximation
spaceand in time.Knox suggests
ofspaceortime
permutations
butunderrandom
forfixedspaceandtimeco-ordinates
statistic
of u is verysmallcomparedwithn. Subsequent
labels,providedthatthenullexpectation
byBarton
ofKnox'sconjecture
byMantel(1967),includestheconfirmation
work,reviewed
and David (1966).
andDurham,Knox(1964)detects
inNorthumberland
leukaemia
In hisstudyofchildhood
Knoxno
Professor
Although
interaction
at the0-17percentlevelof significance.
space-time
from
longerhas thedataavailable,we can salvagea MonteCarlotestusingKnox'sstatistic
ofitsnulldistribution
carried
outbyDr M. C. Pikeandreported
thesimulation
investigation
byDavidandBarton(1966). TheirTableIII showsthaton onlyfouroccasionsoutof2,000
valueforthedata.
equal or exceedtheobserved
did thenumberof space-time
adjacencies
at the0X25percentleveland we havetheexpected
X is rejected
Withinour framework,
is hereeminently
reasonable.
as thePoissonapproximation
between
results,
agreement
forwhichwe are grateful
to Mr C. S.
to theornithological
illustration
We nowreturn
andincontrast
findthePoisson
ofZoology,DurhamUniversity,
ThomasoftheDepartment
had beenkepton 67 pairs
1976,surveillance
inadequate.DuringApril-June
approximation
in NorthShields;
on windowledgesofa disusedwarehouse
whichwerenesting
ofkittiwakes
to investigate
between
locationsofnestsandlaying
whether
anyinteraction
itwasofinterest
directed
to use,as a criterion
we wereinitially
datescouldbe detected.In thisinvestigation
nestssituatednextto one anotheron the samewindowledge,the
of "space adjacency",
bytheir
havebeenstimulated
insomemanner
possibly
beingthatthebirdsmight
implication
weremadeconsuggestions
(Coulsonand White,1958). No definite
immediate
neighbours
dateswithin
andweexplored
fourcriteria,
2,4, 7 and10
timeadjacency
laying
namely
cerning
daysofoneanother.
ofthe
in Table la and includethenullmeansand variances
are summarized
The results
underrandomization
of space-time
(see David and Barton,1966). A
numbers
adjacencies
intheotherthree
whilst
cases,
forthe2-daytimeadjacency
criterion,
formal
testis unnecessary
of
Theresults
to thenulldistribution
wouldbe veryconservative.
a Poissonapproximation
evidence
arealso shownandprovidesubstantial
MonteCarlotestsbasedon 999simulations
forthe Poissontestare notedfor
the corresponding
figures
of space-timeinteraction;
and the
results
between
thesimulation
agreement
We foundonlyrudimentary
comparison.
of space-time
forthenumbers
expectedPoissonfrequencies
adjacencies;forexample,X2
far
results,
testsof a Poissonnulldistribution
producedhighlysignificant
goodness-of-fit
theuseof999simulations
cases. Incidentally,
valuesinallthree
the0 1percentcritical
beyond
We understand
thatwhenthenullmeanandvariance
herewasto enablesuchcomparisons.
practiceis to invokea Normalapproximation.
do not agree,a commonepidemiological
markedskewness,
exhibited
exceptforthe 10-day
However,our simulateddistributions
criterion.
adjacency
that32 ofthe67 siteslay
evidence
In fact,independent
(Coulson,1968)existsto suggest
32
thatthecorresponding
birds.Thehypothesis
in a "preferential
region"colonizedbyfitter
atthe2 percentlevelofsignifia randomsamplefromthe67 wasrejected
layingdatesformed
cance,usinga MonteCarlo testbased on the meanlayingdate forthe 32 sitesand 99
(Barnett,
the standardtestbased on a Normalapproximation
simulations.
Alternatively,
ofspace-time
at the1percentlevel.In thepresence
1974,p. 32)wouldhavegivensignificance
butdo suggest
investigating
a definite
conclusion,
theseresults
alonedo notprovide
interaction,
331
possiblespace-time
interaction
withinthe 32 sites. For each of thefourtimeadjacency
criteriathe observednumberof space-timeadjacenciesaccordswell withits null mean
(Tablelb) andformal
testing
is unnecessary.
We therefore
concludethattheapparent
spacetimeinteraction
in thedatacan be accounted
forbythe"preferential
region"hypothesis
and
thatsmall-scale
explanations
do notseemnecessary.Further
analysisis in progress.
TABLE 1
inkittiwake
data
interaction
Analysis
ofspace-time
(a) Adjacenciesbetweenall 67 sites
Timeadjacencycriterion
(days)
Adjacencies(outof2211)
10
22
22
22
22
Space (observed)
Time(observed)
408
629
886
233
3
7
11
13
Space-time(observed)
2-32
4-06
6-26
8-82
Space-time(nullmean)
4-00
4-56
3-08
Space-time(nullvariance)
1P99
levels(%.)
Significance
75
MonteCarlo (999 trials)
2-6
42
Poissonapproximation
54
10.9
11P7
(b) Adjacencieswithin
"preferential
region"of 32 sites
Timeadjacencycriterion
(days)
Adjacencies(outof496)
Space (observed)
Time(observed)
Space-time(observed)
Space-time(nullmean)
10
11
11
11
11
69
109
163
213
2
3
5
5
2-42
3-62
4-72
1P53
5. SCALESOF PATrERN
Here we outlinetwofurther
testswhichwe have founduseful. The firstconcernsa Monte
Carlo versionof Mead's (1974) two-dimensional
"4's within16" randomizationtestforthe
detection
scalesofpattern
ofdifferent
incontiguous
quadratcountdata. Mead'stestrequires
thatthedata are successively
partitionedinto 1, 4, 16, ... blocksof 16 counts,each consisting
ofa 4 x 4 gridofquadrats.Foreachpartitioning,
thenullhypothesis
isthat,within
eachblock,
theobserved
countsin thefourassociated2 x 2 sub-blocks
forma randomsamplefromthe
= 2,627,625
(16!)/(4!)5
offoursetsoffour.For choiceofteststatistic,
possiblecombinations
see Mead (1974). Theuse ofdifferent
partitions
provides
independent
testsofpattern
at the
variousscales. Althoughthefullrandomizationprocedureappearscomputationally
prohibi-
at eachscalewitha pseudo-random
tive,one maycomparetheteststatistic
samplefromits
randomization
WehaveusedthisMonteCarloadaptation
distribution.
toexamine
patterns
of
treesin LansingWoods(datakindly
suppliedbyProfessor
D. J.Gerrard,
SchoolofForestry,
ofMinnesota)
andalso in thespatialanalysisofgalaxydata.
University
An analogous proceduremay be adoptedforthe detectionof spatialassociationbetween
two setsof contiguousquadratcountsovera singleregionwhere,forexample,each set may
to a particular
correspond
speciesof plant. The twosetsare partitioned
successively
into
332
APPLIED
STATISTICS
and data,acknowledged
in the
to thevariouscontributors
of problems
We are grateful
forhelpful
comments.
textofthepaper,and to thereferees
REFERENCES
Bartlett's
paper. J. R. Statist.Soc. B, 25, 294.
G. A. (1963). Discussionof Professor
BARNARD,
Press.
V. D. (1974). ElementsofSamplingTheory.London: EnglishUniversities
BARNETT,
51,299-311.
pointprocesses.Biometrika,
M. S. (1964). The spectralanalysisoftwo-dimensional
BARTLETT,
of two graphs.In F. N. David (ed.),
D. E. and DAvID,F. N. (1966). The randomintersection
BARTON,
pp. 455-459. New York: Wiley.
ResearchPapersin Statistics,
C., FoRD, E. D. and SMITH,R. (1978). Variationin yield among
CANNELL,M. G. R., KNUJUGUNA,
individualswithinmixedgenotypestandsof tea: a selectionproblemJ.Appl.Ecol. (in press).
competing
F. C. (1954). Distanceto nearestneighbouras a measureof spatialpatternsin
CLARKE,P. J. and EVANS,
biologicalpopulations.Ecology,35, 445-453.
London: Pion.
CLIFF,A. D. and ORD,J. K. (1973). SpatialAutocorrelation.
in thequalityofbirdsnestingin thecentreand on theedgesofa colony.
COULSON,J.C. (1968). Differences
Nature,217,478-479.
333
COULSON,
J. C. and WHITE, E. (1958). The effectof age on the breedingbiologyof the kittiwake,
Rissa
tridactyla.Ibis,100,40-51.
of diversity.II. Proc. 6thBerkeleySymp.4, 109-136.
DAVID,F. N. (1971). Measurement
testsforepidemicity.Brit.J. Prev.
DAVID,F. N. and BARTON,
D. E. (1966). Two space-timeinteraction
Soc. Med. 20, 44-48.
EDGINGTON,
E. S. (1964). Randomizationtests.J.Psychol.,57, 445-449.
(1969). Approximate
randomization
tests.J.Psychol.,72, 143-149.
FISHER,R. A. (1935). The DesignofExperiments.
Edinburgh:Oliver& Boyd.
GREEN,P. J.and SIBSON,
R. (1977). ComputingDirichlettessellations
in theplane. Computer
J. (in press).
testprocedure.J. R. Statist.Soc. B, 30,
Monte Carlo significance
HOPE,A. C. A. (1968). A simplified
582-598.
KNOX,G. (1964). Epidemiologyof childhoodleukaemiain Northumberland
and Durham. Brit.J. Prev.
Soc. Med., 18, 17-24.
P. V. A. (1949). The first
and secondmoments
ofsomeprobability
KRIsHNA-IYER,
distributions
arisingfrom
pointson a lattice,and theirapplications.Biometrika,
36, 135-141.
MANTEL,N. (1967). The detection
ofdiseaseclustering
and a generalized
regression
approach. CancerRes.,
27,209-220.
MEAD,R. (1974). A testforspatialpatternat severalscalesusingdata froma gridofcontiguousquadrats.
Biometrics,
30, 295-307.
MORAN,
P. A. P. (1950). Noteson continuousstochasticphenomena.Biometrika,
37, 17-23.
NUMATA,
M. (1961). Forestvegetationin the vicinityof Choshi-coastalfloraand vegetationat Choshi.
IV. Bull. ChoshiMarineLaboratory,
Chiba Prefecture
Chiba University.No. 3, pp. 28-48.
RIPLEY,B. D. (1976). The second-order
analysisof stationary
pointprocesses.J. Appl.Prob.,13, 255-266.
(1977). Modellingspatialpatterns
(withDiscussion).J.R. Statist.Soc. B, 39, 172-212.
TRIVERS,R. L. (1971). The evolutionof reciprocalaltruism.Quarterly
ReviewBiol.,46, 35-37.