Advanced R course on spatial point patterns Adrian Baddeley / Ege - - PowerPoint PPT Presentation

advanced r course on spatial point patterns
SMART_READER_LITE
LIVE PREVIEW

Advanced R course on spatial point patterns Adrian Baddeley / Ege - - PowerPoint PPT Presentation

Advanced R course on spatial point patterns Adrian Baddeley / Ege Rubak Curtin University / Aalborg University SSAI 2017 Spatial point patterns SSAI Course 2017 1 Plan of Workshop 1. Introduction 2. Inhomogeneous Intensity 3.


slide-1
SLIDE 1

Spatial point patterns SSAI Course 2017 – 1

Advanced R course on spatial point patterns

Adrian Baddeley / Ege Rubak

Curtin University / Aalborg University

SSAI 2017

slide-2
SLIDE 2

Plan of Workshop

Spatial point patterns SSAI Course 2017 – 2

1. Introduction 2. Inhomogeneous Intensity 3. Intensity dependent on a covariate 4. Fitting Poisson models 5. Marked point patterns 6. Correlation 7. Envelopes and Monte Carlo tests 8. Spacing and nearest neighbours 9. Cluster and Cox models 10. Gibbs models 11. Multitype summary functions and models

slide-3
SLIDE 3

The slides are a summary

Spatial point patterns SSAI Course 2017 – 3

These slides are a summary of the most important concepts in the workshop.

slide-4
SLIDE 4

The slides are a summary

Spatial point patterns SSAI Course 2017 – 3

These slides are a summary of the most important concepts in the workshop. Use them for review/reminder

slide-5
SLIDE 5

Spatial point patterns SSAI Course 2017 – 4

Types of spatial data

slide-6
SLIDE 6

Types of spatial data

Spatial point patterns SSAI Course 2017 – 5

Three basic types of spatial data:

slide-7
SLIDE 7

Types of spatial data

Spatial point patterns SSAI Course 2017 – 5

Three basic types of spatial data:

  • geostatistical
slide-8
SLIDE 8

Types of spatial data

Spatial point patterns SSAI Course 2017 – 5

Three basic types of spatial data:

  • geostatistical
  • regional
slide-9
SLIDE 9

Types of spatial data

Spatial point patterns SSAI Course 2017 – 5

Three basic types of spatial data:

  • geostatistical
  • regional
  • point pattern
slide-10
SLIDE 10

Geostatistical data

Spatial point patterns SSAI Course 2017 – 6

GEOSTATISTICAL DATA: The quantity of interest has a value at any location, . . .

slide-11
SLIDE 11

Geostatistical data

Spatial point patterns SSAI Course 2017 – 7

. . . but we only measure the quantity at certain sites. These values are our data.

slide-12
SLIDE 12

Regional data

Spatial point patterns SSAI Course 2017 – 8

REGIONAL DATA: The quantity of interest is only defined for regions. It is measured/reported for certain fixed regions.

slide-13
SLIDE 13

Point pattern data

Spatial point patterns SSAI Course 2017 – 9

POINT PATTERN DATA: The main interest is in the locations of all occurrences of some event (e.g. tree deaths, meteorite impacts, robberies). Exact locations are recorded.

slide-14
SLIDE 14

Points with marks

Spatial point patterns SSAI Course 2017 – 10

Points may also carry data (e.g. tree heights, meteorite composition)

slide-15
SLIDE 15

Point pattern or geostatistical data?

Spatial point patterns SSAI Course 2017 – 11

POINT PATTERN OR GEOSTATISTICAL DATA?

slide-16
SLIDE 16

Explanatory vs. response variables

Spatial point patterns SSAI Course 2017 – 12

Response variable: the quantity that we want to “predict” or “explain” Explanatory variable: quantity that can be used to “predict” or “explain” the response.

slide-17
SLIDE 17

Point pattern or geostatistical data?

Spatial point patterns SSAI Course 2017 – 13

Geostatistics treats the spatial locations as explanatory variables and the values attached to them as response variables. Spatial point pattern statistics treats the spatial locations, and the values attached to them, as the response.

slide-18
SLIDE 18

Point pattern or geostatistical data?

Spatial point patterns SSAI Course 2017 – 14

“Temperature is increasing as we move from South to North” — geostatistics “Trees become less abundant as we move from South to North” — point pattern statistics

slide-19
SLIDE 19

Spatial point patterns SSAI Course 2017 – 15

Software Overview

slide-20
SLIDE 20

Software overview

Spatial point patterns SSAI Course 2017 – 16

For information on spatial statistics software in R:

slide-21
SLIDE 21

Software overview

Spatial point patterns SSAI Course 2017 – 16

For information on spatial statistics software in R:

  • go to cran.r-project.org
slide-22
SLIDE 22

Software overview

Spatial point patterns SSAI Course 2017 – 16

For information on spatial statistics software in R:

  • go to cran.r-project.org
  • find Task Views
slide-23
SLIDE 23

Software overview

Spatial point patterns SSAI Course 2017 – 16

For information on spatial statistics software in R:

  • go to cran.r-project.org
  • find Task Views --- Spatial
slide-24
SLIDE 24

GIS software

Spatial point patterns SSAI Course 2017 – 17

GIS = Geographical Information System

slide-25
SLIDE 25

GIS software

Spatial point patterns SSAI Course 2017 – 17

GIS = Geographical Information System ArcInfo

slide-26
SLIDE 26

GIS software

Spatial point patterns SSAI Course 2017 – 17

GIS = Geographical Information System ArcInfo proprietary

esri.com

slide-27
SLIDE 27

GIS software

Spatial point patterns SSAI Course 2017 – 17

GIS = Geographical Information System ArcInfo proprietary

esri.com

GRASS

  • pen source grass.osgeo.org
slide-28
SLIDE 28

GRASS

Spatial point patterns SSAI Course 2017 – 18

slide-29
SLIDE 29

Recommendations

Spatial point patterns SSAI Course 2017 – 19

Recommendations:

slide-30
SLIDE 30

Recommendations

Spatial point patterns SSAI Course 2017 – 19

Recommendations: For visualisation of spatial data, especially for presentation graphics, use a GIS.

slide-31
SLIDE 31

Recommendations

Spatial point patterns SSAI Course 2017 – 19

Recommendations: For visualisation of spatial data, especially for presentation graphics, use a GIS. For statistical analysis of spatial data, use R.

slide-32
SLIDE 32

Recommendations

Spatial point patterns SSAI Course 2017 – 19

Recommendations: For visualisation of spatial data, especially for presentation graphics, use a GIS. For statistical analysis of spatial data, use R. Establish two-way communication between GIS and R, either through a direct software interface, or by reading/writing files in mutually acceptable format.

slide-33
SLIDE 33

Putting the pieces together

Spatial point patterns SSAI Course 2017 – 20

R GIS

slide-34
SLIDE 34

Putting the pieces together

Spatial point patterns SSAI Course 2017 – 21

R GIS Interface

Interface between R and GIS (online or offline)

slide-35
SLIDE 35

Putting the pieces together

Spatial point patterns SSAI Course 2017 – 22

R GIS

spatial data support

Interface

Support for spatial data: data structures, classes, methods

slide-36
SLIDE 36

R packages supporting spatial data

Spatial point patterns SSAI Course 2017 – 23

R packages supporting spatial data classes:

sp

generic

maps

polygon maps

spatstat

point patterns

slide-37
SLIDE 37

Putting the pieces together

Spatial point patterns SSAI Course 2017 – 24

R GIS

analysis spatial data support

Interface

Capabilities for statistical analysis

slide-38
SLIDE 38

Putting the pieces together

Spatial point patterns SSAI Course 2017 – 25

R GIS

analysis spatial data support analysis analysis

Interface

Multiple packages for different analyses

slide-39
SLIDE 39

Statistical functionality

Spatial point patterns SSAI Course 2017 – 26

R packages for geostatistical data

gstat

classical geostatistics

geoR

model-based geostatistics

RandomFields

stochastic processes

akima

interpolation

slide-40
SLIDE 40

Statistical functionality

Spatial point patterns SSAI Course 2017 – 26

R packages for geostatistical data

gstat

classical geostatistics

geoR

model-based geostatistics

RandomFields

stochastic processes

akima

interpolation R packages for regional data

spdep

spatial dependence

spgwr

geographically weighted regression

slide-41
SLIDE 41

Statistical functionality

Spatial point patterns SSAI Course 2017 – 26

R packages for geostatistical data

gstat

classical geostatistics

geoR

model-based geostatistics

RandomFields

stochastic processes

akima

interpolation R packages for regional data

spdep

spatial dependence

spgwr

geographically weighted regression R packages for point patterns

spatstat

parametric modelling, diagnostics

splancs

nonparametric, space-time

slide-42
SLIDE 42

Spatial point patterns SSAI Course 2017 – 27

Spatial point patterns

slide-43
SLIDE 43

Software

Spatial point patterns SSAI Course 2017 – 28

The R package spatstat supports statistical analysis for spatial point patterns.

slide-44
SLIDE 44

Point patterns

Spatial point patterns SSAI Course 2017 – 29

A point pattern dataset gives the locations of objects/events occurring in a study region. The points could represent trees, animal nests, earthquake epicentres, petty crimes, domiciles of new cases of influenza, galaxies, etc.

slide-45
SLIDE 45

Marks

Spatial point patterns SSAI Course 2017 – 30

The points may have extra information called marks attached to them. The mark represents an “attribute” of the point.

slide-46
SLIDE 46

Marks

Spatial point patterns SSAI Course 2017 – 30

The points may have extra information called marks attached to them. The mark represents an “attribute” of the point. The mark variable could be categorical, e.g. species or disease status:

  • n
  • ff
  • ff
  • n
slide-47
SLIDE 47

Continuous marks

Spatial point patterns SSAI Course 2017 – 31

The mark variable could be continuous, e.g. tree diameter:

20 40 60
slide-48
SLIDE 48

Covariates

Spatial point patterns SSAI Course 2017 – 32

Our dataset may also include covariates — any data that we treat as explanatory, rather than as part of the ‘response’. Covariate data may be a spatial function Z(u) defined at all spatial locations u, e.g. altitude, soil pH, displayed as a pixel image or a contour plot:

125 125 1 3 130 130 130 135 1 3 5 1 3 5 140 140 140 145 145 150 150 1 5 5
slide-49
SLIDE 49

Covariates

Spatial point patterns SSAI Course 2017 – 33

Covariate data may be another spatial pattern such as another point pattern, or a line segment pattern, e.g. a map of geological faults:

slide-50
SLIDE 50

Spatial point patterns SSAI Course 2017 – 34

Intensity

slide-51
SLIDE 51

Intensity

Spatial point patterns SSAI Course 2017 – 35

‘Intensity’ is the average density of points (expected number of points per unit area). Intensity may be constant (‘uniform’) or may vary from location to location (‘non-uniform’ or ‘inhomogeneous’).

uniform inhomogeneous

slide-52
SLIDE 52

Swedish Pines data

Spatial point patterns SSAI Course 2017 – 36

> data(swedishpines) > P <- swedishpines > plot(P)

slide-53
SLIDE 53

Quadrat counts

Spatial point patterns SSAI Course 2017 – 37

Divide study region into rectangles (‘quadrats’) of equal size, and count points in each rectangle.

Q <- quadratcount(P, nx=3, ny=3) Q plot(Q, add=TRUE)

P

+ + + + + + + + + + + + + + + + + + + + + + ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

8 6 7 8 11 9 5 6 11

slide-54
SLIDE 54

χ2 test of uniformity

Spatial point patterns SSAI Course 2017 – 38

If the points have uniform intensity, and are completely random, then the quadrat counts should be Poisson random numbers with constant mean.

slide-55
SLIDE 55

χ2 test of uniformity

Spatial point patterns SSAI Course 2017 – 38

If the points have uniform intensity, and are completely random, then the quadrat counts should be Poisson random numbers with constant mean. Use the χ2 goodness-of-fit test statistic

X2 = (observed − expected)2

expected

slide-56
SLIDE 56

χ2 test of uniformity

Spatial point patterns SSAI Course 2017 – 38

If the points have uniform intensity, and are completely random, then the quadrat counts should be Poisson random numbers with constant mean. Use the χ2 goodness-of-fit test statistic

X2 = (observed − expected)2

expected

> quadrat.test(P, nx=3, ny=3) Chi-squared test of CSR using quadrat counts data: P X-squared = 4.6761, df = 8, p-value = 0.7916

slide-57
SLIDE 57

χ2 test of uniformity

Spatial point patterns SSAI Course 2017 – 39

> QT <- quadrat.test(P, nx=3, ny=3) > plot(P) > plot(QT, add=TRUE)

8 6 7 8 11 9 5 6 11 7.9 7.9 7.9 7.9 7.9 7.9 7.9 7.9 7.9 0.04 −0.67 −0.32 0.04 1.1 0.4 −1 −0.67 1.1

slide-58
SLIDE 58

Kernel smoothing

Spatial point patterns SSAI Course 2017 – 40

Kernel smoothed intensity

  • λ(u) =

n

  • i=1

κ(u − xi)

where κ(u) is the kernel function and x1, . . . , xn are the data points.

slide-59
SLIDE 59

Kernel smoothing

Spatial point patterns SSAI Course 2017 – 40

Kernel smoothed intensity

  • λ(u) =

n

  • i=1

κ(u − xi)

where κ(u) is the kernel function and x1, . . . , xn are the data points. 1. replace each data point by a square of chocolate

slide-60
SLIDE 60

Kernel smoothing

Spatial point patterns SSAI Course 2017 – 40

Kernel smoothed intensity

  • λ(u) =

n

  • i=1

κ(u − xi)

where κ(u) is the kernel function and x1, . . . , xn are the data points. 1. replace each data point by a square of chocolate 2. melt chocolate with hair dryer

slide-61
SLIDE 61

Kernel smoothing

Spatial point patterns SSAI Course 2017 – 40

Kernel smoothed intensity

  • λ(u) =

n

  • i=1

κ(u − xi)

where κ(u) is the kernel function and x1, . . . , xn are the data points. 1. replace each data point by a square of chocolate 2. melt chocolate with hair dryer 3. resulting landscape is a kernel smoothed estimate of intensity function

slide-62
SLIDE 62

Kernel smoothing

Spatial point patterns SSAI Course 2017 – 41

den <- density(P, sigma=15) plot(den) plot(P, add=TRUE)

0.004 0.006 0.008 0.01 0.012

+ + + + + + + + + + + + + + + + + ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++ ++ + +

slide-63
SLIDE 63

Modelling intensity

Spatial point patterns SSAI Course 2017 – 42

A more searching analysis involves fitting models that describe how the point pattern intensity λ(u) depends on spatial location u or on spatial covariates Z(u).

slide-64
SLIDE 64

Modelling intensity

Spatial point patterns SSAI Course 2017 – 42

A more searching analysis involves fitting models that describe how the point pattern intensity λ(u) depends on spatial location u or on spatial covariates Z(u). Intensity is modelled using a “log link”.

slide-65
SLIDE 65

Modelling intensity

Spatial point patterns SSAI Course 2017 – 43

COMMAND INTENSITY

ppm(P ~1) log λ(u) = β0

slide-66
SLIDE 66

Modelling intensity

Spatial point patterns SSAI Course 2017 – 43

COMMAND INTENSITY

ppm(P ~1) log λ(u) = β0 β0, β1, . . . denote parameters to be estimated.

slide-67
SLIDE 67

Modelling intensity

Spatial point patterns SSAI Course 2017 – 43

COMMAND INTENSITY

ppm(P ~1) log λ(u) = β0 ppm(P ~x) log λ((x, y)) = β0 + β1x β0, β1, . . . denote parameters to be estimated.

slide-68
SLIDE 68

Modelling intensity

Spatial point patterns SSAI Course 2017 – 43

COMMAND INTENSITY

ppm(P ~1) log λ(u) = β0 ppm(P ~x) log λ((x, y)) = β0 + β1x ppm(P ~x + y) log λ((x, y)) = β0 + β1x + β2y β0, β1, . . . denote parameters to be estimated.

slide-69
SLIDE 69

Swedish Pines data

Spatial point patterns SSAI Course 2017 – 44

> ppm(P ~1) Stationary Poisson process Uniform intensity: 0.007

slide-70
SLIDE 70

Swedish Pines data

Spatial point patterns SSAI Course 2017 – 45

> ppm(P ~x+y) Nonstationary Poisson process Trend formula: ~x + y Fitted coefficients for trend formula: (Intercept) x y

  • 5.1237

0.00461

  • 0.00025
slide-71
SLIDE 71

Modelling intensity

Spatial point patterns SSAI Course 2017 – 46

COMMAND INTENSITY

ppm(P ~polynom(x,y,3)) exp(3rd order polynomial in x and y)

slide-72
SLIDE 72

Modelling intensity

Spatial point patterns SSAI Course 2017 – 46

COMMAND INTENSITY

ppm(P ~polynom(x,y,3)) exp(3rd order polynomial in x and y) ppm(P ~I(y > 18))

different constants above and below the line y = 18

slide-73
SLIDE 73

Fitted intensity

Spatial point patterns SSAI Course 2017 – 47

fit <- ppm(P ~x+y) lam <- predict(fit) plot(lam)

The predict method computes fitted values of intensity function λ(u) at a grid of locations.

lam

0.006 0.007 0.008 0.009

slide-74
SLIDE 74

Likelihood ratio test

Spatial point patterns SSAI Course 2017 – 48

fit0 <- ppm(P ~1) fit1 <- ppm(P ~polynom(x,y,2)) anova(fit0, fit1, test="Chi")

slide-75
SLIDE 75

Likelihood ratio test

Spatial point patterns SSAI Course 2017 – 48

fit0 <- ppm(P ~1) fit1 <- ppm(P ~polynom(x,y,2)) anova(fit0, fit1, test="Chi") Analysis of Deviance Table Model 1: ~1 Poisson Model 2: ~x + y + I(x^2) + I(x * y) + I(y^2) Poisson Npar Df Deviance Pr(>Chi) 1 1 2 6 5 7.4821 0.1872

slide-76
SLIDE 76

Likelihood ratio test

Spatial point patterns SSAI Course 2017 – 48

fit0 <- ppm(P ~1) fit1 <- ppm(P ~polynom(x,y,2)) anova(fit0, fit1, test="Chi") Analysis of Deviance Table Model 1: ~1 Poisson Model 2: ~x + y + I(x^2) + I(x * y) + I(y^2) Poisson Npar Df Deviance Pr(>Chi) 1 1 2 6 5 7.4821 0.1872

The p-value 0.19 exceeds 0.05 so the log-quadratic spatial trend is not significant.

slide-77
SLIDE 77

Residuals

Spatial point patterns SSAI Course 2017 – 49

diagnose.ppm(fit0, which="smooth")

− . 3 −0.002 −0.002 −0.001 −0.001 0.001 0.001 0.002 0.002 0.003 . 4 . 5

Smoothed raw residuals

slide-78
SLIDE 78

Spatial point patterns SSAI Course 2017 – 50

Spatial covariates

slide-79
SLIDE 79

Spatial covariates

Spatial point patterns SSAI Course 2017 – 51

A spatial covariate is a function Z(u) of spatial location.

slide-80
SLIDE 80

Spatial covariates

Spatial point patterns SSAI Course 2017 – 51

A spatial covariate is a function Z(u) of spatial location.

  • geographical coordinates
slide-81
SLIDE 81

Spatial covariates

Spatial point patterns SSAI Course 2017 – 51

A spatial covariate is a function Z(u) of spatial location.

  • geographical coordinates
  • terrain altitude
slide-82
SLIDE 82

Spatial covariates

Spatial point patterns SSAI Course 2017 – 51

A spatial covariate is a function Z(u) of spatial location.

  • geographical coordinates
  • terrain altitude
  • soil pH
slide-83
SLIDE 83

Spatial covariates

Spatial point patterns SSAI Course 2017 – 51

A spatial covariate is a function Z(u) of spatial location.

  • geographical coordinates
  • terrain altitude
  • soil pH
  • distance from location u to another feature
slide-84
SLIDE 84

Spatial covariates

Spatial point patterns SSAI Course 2017 – 51

A spatial covariate is a function Z(u) of spatial location.

  • geographical coordinates
  • terrain altitude
  • soil pH
  • distance from location u to another feature
125 125 1 3 130 130 130 135 1 3 5 1 3 5 140 140 140 145 145 150 150 1 5 5
slide-85
SLIDE 85

Covariates

Spatial point patterns SSAI Course 2017 – 52

Covariate data may be another spatial pattern such as another point pattern, or a line segment pattern:

slide-86
SLIDE 86

Covariate effects

Spatial point patterns SSAI Course 2017 – 53

For a point pattern dataset with covariate data, we typically

  • investigate whether the intensity depends on the covariates
  • allow for covariate effects on intensity before studying dependence between

points

slide-87
SLIDE 87

Example: Queensland copper data

Spatial point patterns SSAI Course 2017 – 54

A intensive mineralogical survey yields a map of copper deposits (essentially pointlike at this scale) and geological faults (straight lines). The faults can easily be observed from satellites, but the copper deposits are hard to find. Main question: whether the faults are ‘predictive’ for copper deposits (e.g. copper less/more likely to be found near faults).

slide-88
SLIDE 88

Copper data

Spatial point patterns SSAI Course 2017 – 55

data(copper) P <- copper$SouthPoints Y <- copper$SouthLines plot(P) plot(Y, add=TRUE)

+ + ++ + + + + ++ + + + + + + + + + + ++ + + + + + + + + + + +++ + + + + + + + ++ + + + + + + + + ++ + ++

slide-89
SLIDE 89

Copper data

Spatial point patterns SSAI Course 2017 – 56

For analysis, we need a value Z(u) defined at each location u.

slide-90
SLIDE 90

Copper data

Spatial point patterns SSAI Course 2017 – 56

For analysis, we need a value Z(u) defined at each location u. Example: Z(u) = distance from u to nearest line.

slide-91
SLIDE 91

Copper data

Spatial point patterns SSAI Course 2017 – 56

For analysis, we need a value Z(u) defined at each location u. Example: Z(u) = distance from u to nearest line.

Z <- distmap(Y) plot(Z)

Z

2 4 6 8 10

slide-92
SLIDE 92

Lurking variable plot

Spatial point patterns SSAI Course 2017 – 57

We want to determine whether intensity depends on a spatial covariate Z.

slide-93
SLIDE 93

Lurking variable plot

Spatial point patterns SSAI Course 2017 – 57

We want to determine whether intensity depends on a spatial covariate Z. Plot C(z) against z, where C(z) = fraction of data points xi for which Z(xi) ≤ z.

slide-94
SLIDE 94

Lurking variable plot

Spatial point patterns SSAI Course 2017 – 57

We want to determine whether intensity depends on a spatial covariate Z. Plot C(z) against z, where C(z) = fraction of data points xi for which Z(xi) ≤ z. Also plot C0(z) against z, where C0(z) = fraction of area of study region where Z(u) ≤ z.

slide-95
SLIDE 95

Lurking variable plot

Spatial point patterns SSAI Course 2017 – 57

We want to determine whether intensity depends on a spatial covariate Z. Plot C(z) against z, where C(z) = fraction of data points xi for which Z(xi) ≤ z. Also plot C0(z) against z, where C0(z) = fraction of area of study region where Z(u) ≤ z.

lurking(ppm(P), Z)

slide-96
SLIDE 96

Lurking variable plot

Spatial point patterns SSAI Course 2017 – 57

We want to determine whether intensity depends on a spatial covariate Z. Plot C(z) against z, where C(z) = fraction of data points xi for which Z(xi) ≤ z. Also plot C0(z) against z, where C0(z) = fraction of area of study region where Z(u) ≤ z.

lurking(ppm(P), Z)

2 4 6 8 10 1000 2000 3000 4000 5000

distance to nearest line probability

slide-97
SLIDE 97

Kolmogorov-Smirnov test

Spatial point patterns SSAI Course 2017 – 58

Formal test of agreement between C(z) and C0(z).

slide-98
SLIDE 98

Kolmogorov-Smirnov test

Spatial point patterns SSAI Course 2017 – 58

Formal test of agreement between C(z) and C0(z).

> kstest(P, Z) Spatial Kolmogorov-Smirnov test of CSR data: covariate ’Z’ evaluated at points of ’P’ and transformed to uniform distribution under CSR D = 0.1163, p-value = 0.3939 alternative hypothesis: two-sided

slide-99
SLIDE 99

Copper data

Spatial point patterns SSAI Course 2017 – 59

Z <- distmap(Y) ppm(P ~ Z)

Fits the model

log λ(u) = β0 + β1Z(u)

where Z(u) is the distance from u to the nearest line segment.

slide-100
SLIDE 100

Copper data

Spatial point patterns SSAI Course 2017 – 60

Z <- distmap(Y) ppm(P ~ polynom(Z,5))

fits a model in which log λ(u) is a 5th order polynomial function of Z(u).

slide-101
SLIDE 101

Copper data

Spatial point patterns SSAI Course 2017 – 61

fit <- ppm(P ~polynom(Z,5)) plot(predict(fit))

0.005 0.01 0.015

slide-102
SLIDE 102

Copper data

Spatial point patterns SSAI Course 2017 – 62

plot(effectfun(fit))

plots fitted curve of λ against Z.

slide-103
SLIDE 103

Copper data

Spatial point patterns SSAI Course 2017 – 63

2 4 6 8 10 0.000 0.005 0.010 0.015

effectfun(fit)

distance to nearest line intensity

slide-104
SLIDE 104

Likelihood ratio test

Spatial point patterns SSAI Course 2017 – 64

fit0 <- ppm(P ~1) fit1 <- ppm(P ~polynom(Z,5)) anova(fit0, fit1, test="Chi")

slide-105
SLIDE 105

Likelihood ratio test

Spatial point patterns SSAI Course 2017 – 64

fit0 <- ppm(P ~1) fit1 <- ppm(P ~polynom(Z,5)) anova(fit0, fit1, test="Chi") Analysis of Deviance Table Model 1: ~1 Poisson Model 2: ~Z + I(Z^2) + I(Z^3) + I(Z^4) + I(Z^5) Poisson Npar Df Deviance Pr(>Chi) 1 1 2 6 5 3.6476 0.6012

slide-106
SLIDE 106

Likelihood ratio test

Spatial point patterns SSAI Course 2017 – 64

fit0 <- ppm(P ~1) fit1 <- ppm(P ~polynom(Z,5)) anova(fit0, fit1, test="Chi") Analysis of Deviance Table Model 1: ~1 Poisson Model 2: ~Z + I(Z^2) + I(Z^3) + I(Z^4) + I(Z^5) Poisson Npar Df Deviance Pr(>Chi) 1 1 2 6 5 3.6476 0.6012

The p-value 0.81 exceeds 0.05 so the 5th order polynomial is not significant.

slide-107
SLIDE 107

Interaction

Spatial point patterns SSAI Course 2017 – 65

‘Interpoint interaction’ is stochastic dependence between the points in a point pattern. Usually we expect dependence to be strongest between points that are close to one another.

independent regular clustered

slide-108
SLIDE 108

Example

Spatial point patterns SSAI Course 2017 – 66

Example: spacing between points in Swedish Pines data

swedishpines
slide-109
SLIDE 109

Example

Spatial point patterns SSAI Course 2017 – 67

nearest neighbour distance = distance from a given point to the nearest other point

swedishpines

slide-110
SLIDE 110

Example

Spatial point patterns SSAI Course 2017 – 68

Summary approach:

slide-111
SLIDE 111

Example

Spatial point patterns SSAI Course 2017 – 68

Summary approach: 1. calculate average nearest-neighbour distance

slide-112
SLIDE 112

Example

Spatial point patterns SSAI Course 2017 – 68

Summary approach: 1. calculate average nearest-neighbour distance 2. divide by the value expected for a completely random pattern.

Clark & Evans (1954)

slide-113
SLIDE 113

Example

Spatial point patterns SSAI Course 2017 – 68

Summary approach: 1. calculate average nearest-neighbour distance 2. divide by the value expected for a completely random pattern.

Clark & Evans (1954)

> mean(nndist(swedishpines)) [1] 7.90754 > clarkevans(swedishpines) naive Donnelly cdf 1.360082 1.291069 1.322862

slide-114
SLIDE 114

Example

Spatial point patterns SSAI Course 2017 – 68

Summary approach: 1. calculate average nearest-neighbour distance 2. divide by the value expected for a completely random pattern.

Clark & Evans (1954)

> mean(nndist(swedishpines)) [1] 7.90754 > clarkevans(swedishpines) naive Donnelly cdf 1.360082 1.291069 1.322862

Value greater than 1 suggests a regular pattern.

slide-115
SLIDE 115

Example

Spatial point patterns SSAI Course 2017 – 69

Exploratory approach:

slide-116
SLIDE 116

Example

Spatial point patterns SSAI Course 2017 – 69

Exploratory approach:

  • plot NND for each point

P <- swedishpines marks(P) <- nndist(P) plot(P, markscale=0.5)

4 6 8 10 12 14
slide-117
SLIDE 117

Example

Spatial point patterns SSAI Course 2017 – 70

Exploratory approach:

  • plot NND for each point
slide-118
SLIDE 118

Example

Spatial point patterns SSAI Course 2017 – 70

Exploratory approach:

  • plot NND for each point
  • look at empirical distribution of NND’s

plot(Gest(swedishpines))

0.0 0.2 0.4 0.6 0.8 Gest(swedishpines) G ^ km(r) G ^ bord(r) G ^ han(r) G pois(r)
slide-119
SLIDE 119

Example

Spatial point patterns SSAI Course 2017 – 71

Modelling approach:

slide-120
SLIDE 120

Example

Spatial point patterns SSAI Course 2017 – 71

Modelling approach:

  • Fit a stochastic model to the point pattern, with likelihood based on the NND’s.
slide-121
SLIDE 121

Example

Spatial point patterns SSAI Course 2017 – 71

Modelling approach:

  • Fit a stochastic model to the point pattern, with likelihood based on the NND’s.

> ppm(P ~1, Geyer(4,1)) Stationary Geyer saturation process First order term: beta 0.00971209 Fitted interaction parameter gamma: 0.6335

slide-122
SLIDE 122

Example: Japanese pines

Spatial point patterns SSAI Course 2017 – 72

Locations of 65 saplings of Japanese pine in a 5.7 × 5.7 metre square sampling region in a natural stand.

data(japanesepines) J <- japanesepines plot(J)

Japanese Pines

slide-123
SLIDE 123

Japanese Pines

Spatial point patterns SSAI Course 2017 – 73

fit <- ppm(J ~polynom(x,y,3)) plot(predict(fit)) plot(J, add=TRUE)

predict(fit)

50 100 150 200 250

slide-124
SLIDE 124

Adjusting for inhomogeneity

Spatial point patterns SSAI Course 2017 – 74

If the intensity function λ(u) is known, or estimated from data, then some statistics can be adjusted by counting each data point xi with a weight wi = 1/λ(xi).

slide-125
SLIDE 125

Inhomogeneous K-function

Spatial point patterns SSAI Course 2017 – 75

lam <- predict(fit) plot(Kinhom(J, lam))

0.00 0.05 0.10 0.15 0.20 0.25 0.00 0.05 0.10 0.15 0.20

Kinhom(J, lam)

r (one unit = 5.7 metres) K inhom(r) K^

inhom iso

(r)

K^

inhom trans (r)

K^

inhom bord (r)

K^

inhom bordm(r)

K inhom

pois (r)

slide-126
SLIDE 126

Conditional intensity

Spatial point patterns SSAI Course 2017 – 76

A point process model can also be defined through its conditional intensity λ(u | x). This is essentially the conditional probability of finding a point of the process at the location u, given complete information about the rest of the process x.

u

slide-127
SLIDE 127

Strauss process

Spatial point patterns SSAI Course 2017 – 77

Strauss(γ = 0.2) Strauss(γ = 0.7)

slide-128
SLIDE 128

Fitting Gibbs models

Spatial point patterns SSAI Course 2017 – 78

The command ppm will also fit Gibbs models, using the technique of ‘maximum pseudolikelihood’.

slide-129
SLIDE 129

Fitting Gibbs models

Spatial point patterns SSAI Course 2017 – 78

The command ppm will also fit Gibbs models, using the technique of ‘maximum pseudolikelihood’.

data(swedishpines) ppm(swedishpines ~1, Strauss(r=7))

slide-130
SLIDE 130

Fitting Gibbs models

Spatial point patterns SSAI Course 2017 – 78

The command ppm will also fit Gibbs models, using the technique of ‘maximum pseudolikelihood’.

data(swedishpines) ppm(swedishpines ~1, Strauss(r=7)) Stationary Strauss process First order term: beta 0.02583902 Interaction: Strauss process interaction distance: 7 Fitted interaction parameter gamma: 0.1841

slide-131
SLIDE 131

Fitting Gibbs models

Spatial point patterns SSAI Course 2017 – 79

The model can include both spatial trend and interpoint interaction.

slide-132
SLIDE 132

Fitting Gibbs models

Spatial point patterns SSAI Course 2017 – 79

The model can include both spatial trend and interpoint interaction.

data(japanesepines) ppm(japanesepines ~polynom(x,y,3), Strauss(r=0.07))

slide-133
SLIDE 133

Fitting Gibbs models

Spatial point patterns SSAI Course 2017 – 79

The model can include both spatial trend and interpoint interaction.

data(japanesepines) ppm(japanesepines ~polynom(x,y,3), Strauss(r=0.07)) Nonstationary Strauss process Trend formula: ~polynom(x, y, 3) Fitted coefficients for trend formula: (Intercept) polynom(x, y, 3)[x] polynom(x, y, 3)[y] 0.4925368 22.0485400

  • 9.1889134

polynom(x, y, 3)[x^2] polynom(x, y, 3)[x.y] polynom(x, y, 3)[y^2]

  • 14.6524958
  • 41.0222232

50.2099917 polynom(x, y, 3)[x^3] polynom(x, y, 3)[x^2.y] polynom(x, y, 3)[x.y^2] 3.4935300 5.4524828 23.9209323 polynom(x, y, 3)[y^3]

  • 38.3946389

Interaction: Strauss process interaction distance: 0.1 Fitted interaction parameter gamma: 0.5323

slide-134
SLIDE 134

Plotting a fitted model

Spatial point patterns SSAI Course 2017 – 80

When we plot or predict a fitted Gibbs model, the first order trend β(u) and/or the conditional intensity λ(u | x) are plotted.

fit <- ppm(japanesepines ~x, Strauss(r=0.1)) plot(predict(fit)) plot(predict(fit, type="cif"))

predict(fit)

60 65 70 75 80 85

predict(fit, type = "cif")

20 30 40 50 60 70 80

slide-135
SLIDE 135

Simulating the fitted model

Spatial point patterns SSAI Course 2017 – 81

A fitted Gibbs model can be simulated automatically using the Metropolis-Hastings algorithm (which

  • nly requires the conditional intensity).
slide-136
SLIDE 136

Simulating the fitted model

Spatial point patterns SSAI Course 2017 – 81

A fitted Gibbs model can be simulated automatically using the Metropolis-Hastings algorithm (which

  • nly requires the conditional intensity).

fit <- ppm(swedishpines ~1, Strauss(r=7)) Xsim <- simulate(fit) plot(Xsim)

slide-137
SLIDE 137

Simulating the fitted model

Spatial point patterns SSAI Course 2017 – 81

A fitted Gibbs model can be simulated automatically using the Metropolis-Hastings algorithm (which

  • nly requires the conditional intensity).

fit <- ppm(swedishpines ~1, Strauss(r=7)) Xsim <- simulate(fit) plot(Xsim)

Xsim

slide-138
SLIDE 138

Simulation-based tests

Spatial point patterns SSAI Course 2017 – 82

Tests of goodness-of-fit can be performed by simulating from the fitted model.

plot(envelope(fit, Gest, nsim=19))

2 4 6 8 10 0.0 0.2 0.4 0.6 0.8 1.0

envelope(fit, Gest, nsim = 39)

r (one unit = 0.1 metres) G(r) G ^

  • bs(r)

G(r) G ^

hi(r)

G ^

lo(r)

slide-139
SLIDE 139

Diagnostics

Spatial point patterns SSAI Course 2017 – 83

More powerful diagnostics are available.

diagnose.ppm(fit)

−0.004 −0.004 −0.004 − . 2 −0.002 −0.002 0.002 . 2 0.004 . 4 0.004 0.006

20 40 60 80 100 −8 −6 −4 −2 2 4 cumulative sum of raw residuals 20 40 60 80 100 y coordinate 8 6 4 2 −2 −4 −6 cumulative sum of raw residuals

slide-140
SLIDE 140

Spatial point patterns SSAI Course 2017 – 84

Marks

slide-141
SLIDE 141

Marks

Spatial point patterns SSAI Course 2017 – 85

Each point in a spatial point pattern may carry additional information called a ‘mark’. It may be a continuous variate: tree diameter, tree height a categorical variate: label classifying the points into two or more different types (on/off, case/control, species, colour)

20 40 60

  • n
  • ff

In spatstat version 1, the mark attached to each point must be a single value.

slide-142
SLIDE 142

Spatial point patterns SSAI Course 2017 – 86

Categorical marks

slide-143
SLIDE 143

Categorical marks

Spatial point patterns SSAI Course 2017 – 87

A point pattern with categorical marks is usually called “multi-type”.

> data(amacrine) > amacrine marked planar point pattern: 294 points multitype, with levels = off

  • n

window: rectangle = [0, 1.6012] x [0, 1] units (one unit = 662 microns) > plot(amacrine)

amacrine

  • n
  • ff
slide-144
SLIDE 144

Multitype point patterns

Spatial point patterns SSAI Course 2017 – 88

summary(amacrine)

slide-145
SLIDE 145

Multitype point patterns

Spatial point patterns SSAI Course 2017 – 88

summary(amacrine) Marked planar point pattern: 294 points Average intensity 184 points per square unit (one unit = 662 microns) Multitype: frequency proportion intensity

  • ff

142 0.483 88.7

  • n

152 0.517 94.9 Window: rectangle = [0, 1.6012] x [0, 1] units Window area = 1.60121 square units Unit of length: 662 microns

slide-146
SLIDE 146

Intensity of multitype patterns

Spatial point patterns SSAI Course 2017 – 89

plot(split(amacrine))

split(amacrine)

  • ff
  • n
slide-147
SLIDE 147

Intensity of multitype patterns

Spatial point patterns SSAI Course 2017 – 90

data(lansing) summary(lansing) plot(lansing)

lansing

whiteoak redoak misc maple hickory blackoak

slide-148
SLIDE 148

Intensity of multitype patterns

Spatial point patterns SSAI Course 2017 – 91

“Segregation” occurs when the intensity depends on the mark (i.e. on the type of point).

plot(split(lansing))

split(lansing) blackoak hickory maple misc redoak whiteoak

slide-149
SLIDE 149

Intensity of multitype patterns

Spatial point patterns SSAI Course 2017 – 92

Let λ(u, m) be the intensity function for points of type m at location u. This can be estimated by kernel smoothing the data points of type m.

plot(density(split(lansing)))

blackoak hickory maple misc redoak whiteoak
slide-150
SLIDE 150

Segregation

Spatial point patterns SSAI Course 2017 – 93

The probability that a point at location u has mark m is

p(m | u) = λ(u, m) λ(u)

where λ(u) =

m λ(u, m) is the intensity function of points of all types.

slide-151
SLIDE 151

Segregation

Spatial point patterns SSAI Course 2017 – 94

lansP <- relrisk(lansing) plot(lansP)

blackoak

0.05 0.15 0.25

hickory

0.1 0.3 0.5 0.7

maple

0.1 0.3 0.5 0.7

misc

0.05 0.15

redoak

0.1 0.2 0.3

whiteoak

0.1 0.3 0.5

slide-152
SLIDE 152

Spatial point patterns SSAI Course 2017 – 95

Interaction between types

slide-153
SLIDE 153

Interaction between types

Spatial point patterns SSAI Course 2017 – 96

In a multitype point pattern, there may be interaction between the points of different types, or between points of the same type.

amacrine

  • n
  • ff
slide-154
SLIDE 154

Bivariate G-function

Spatial point patterns SSAI Course 2017 – 97

Assume the points of type i have uniform intensity λi, for all i. For two given types i and j, the bivariate G-function Gij is

Gij(r) = P(Rij ≤ r)

where Rij is the distance from a typical point of type i to the nearest point of type j.

slide-155
SLIDE 155

Bivariate G-function

Spatial point patterns SSAI Course 2017 – 98

plot(Gcross(amacrine, "on", "off"))

0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.0 0.2 0.4 0.6 0.8

Gcross(amacrine, "on", "off")

r (one unit = 662 microns) G on, off(r) G ^

  • n, off
km

(r)

G ^

  • n, off
bord (r)

G ^

  • n, off
han (r)

G on, off

pois (r)
slide-156
SLIDE 156

Bivariate G-function

Spatial point patterns SSAI Course 2017 – 99

plot(alltypes(amacrine, Gcross))

0.00 0.02 0.04 0.06 0.08 0.10 0.0 0.2 0.4 0.6 0.8 r (one unit = 662 microns) Goff, off(r) 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.0 0.2 0.4 0.6 0.8 r (one unit = 662 microns) Goff, on(r) 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.0 0.2 0.4 0.6 0.8 r (one unit = 662 microns) Gon, off(r) 0.00 0.02 0.04 0.06 0.08 0.10 0.0 0.2 0.4 0.6 0.8 r (one unit = 662 microns) Gon, on(r)
  • ff
  • n
  • ff
  • n

array of Gcross functions for amacrine.

slide-157
SLIDE 157

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

slide-158
SLIDE 158

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

ppm(X ~1)

slide-159
SLIDE 159

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

ppm(X ~1) log λ(u, m) = β constant.

slide-160
SLIDE 160

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

ppm(X ~1) log λ(u, m) = β constant.

Equal intensity for points of each type.

slide-161
SLIDE 161

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

ppm(X ~1) log λ(u, m) = β constant.

Equal intensity for points of each type.

ppm(X ~marks)

slide-162
SLIDE 162

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

ppm(X ~1) log λ(u, m) = β constant.

Equal intensity for points of each type.

ppm(X ~marks) log λ(u, m) = βm

slide-163
SLIDE 163

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

ppm(X ~1) log λ(u, m) = β constant.

Equal intensity for points of each type.

ppm(X ~marks) log λ(u, m) = βm

Different constant intensity for points of each type.

slide-164
SLIDE 164

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

ppm(X ~1) log λ(u, m) = β constant.

Equal intensity for points of each type.

ppm(X ~marks) log λ(u, m) = βm

Different constant intensity for points of each type.

ppm(X ~marks + x)

slide-165
SLIDE 165

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

ppm(X ~1) log λ(u, m) = β constant.

Equal intensity for points of each type.

ppm(X ~marks) log λ(u, m) = βm

Different constant intensity for points of each type.

ppm(X ~marks + x) log λ((x, y), m) = βm + αx

slide-166
SLIDE 166

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

ppm(X ~1) log λ(u, m) = β constant.

Equal intensity for points of each type.

ppm(X ~marks) log λ(u, m) = βm

Different constant intensity for points of each type.

ppm(X ~marks + x) log λ((x, y), m) = βm + αx

Common spatial trend

slide-167
SLIDE 167

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

ppm(X ~1) log λ(u, m) = β constant.

Equal intensity for points of each type.

ppm(X ~marks) log λ(u, m) = βm

Different constant intensity for points of each type.

ppm(X ~marks + x) log λ((x, y), m) = βm + αx

Common spatial trend Different overall intensity for each type.

slide-168
SLIDE 168

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

ppm(X ~1) log λ(u, m) = β constant.

Equal intensity for points of each type.

ppm(X ~marks) log λ(u, m) = βm

Different constant intensity for points of each type.

ppm(X ~marks + x) log λ((x, y), m) = βm + αx

Common spatial trend Different overall intensity for each type.

ppm(X ~marks + x + marks:x)

slide-169
SLIDE 169

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

ppm(X ~1) log λ(u, m) = β constant.

Equal intensity for points of each type.

ppm(X ~marks) log λ(u, m) = βm

Different constant intensity for points of each type.

ppm(X ~marks + x) log λ((x, y), m) = βm + αx

Common spatial trend Different overall intensity for each type.

ppm(X ~marks + x + marks:x)

equivalent to

ppm(X ~marks * x)

slide-170
SLIDE 170

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

ppm(X ~1) log λ(u, m) = β constant.

Equal intensity for points of each type.

ppm(X ~marks) log λ(u, m) = βm

Different constant intensity for points of each type.

ppm(X ~marks + x) log λ((x, y), m) = βm + αx

Common spatial trend Different overall intensity for each type.

ppm(X ~marks + x + marks:x)

equivalent to

ppm(X ~marks * x) log λ((x, y), m) = βm + αmx

slide-171
SLIDE 171

Fitting Poisson models

Spatial point patterns SSAI Course 2017 – 100

For a multitype point pattern: COMMAND INTERPRETATION

ppm(X ~1) log λ(u, m) = β constant.

Equal intensity for points of each type.

ppm(X ~marks) log λ(u, m) = βm

Different constant intensity for points of each type.

ppm(X ~marks + x) log λ((x, y), m) = βm + αx

Common spatial trend Different overall intensity for each type.

ppm(X ~marks + x + marks:x)

equivalent to

ppm(X ~marks * x) log λ((x, y), m) = βm + αmx

Different spatial trends for each type

slide-172
SLIDE 172

Segregation test

Spatial point patterns SSAI Course 2017 – 101

Likelihood ratio test of segregation in Lansing Woods data:

slide-173
SLIDE 173

Segregation test

Spatial point patterns SSAI Course 2017 – 101

Likelihood ratio test of segregation in Lansing Woods data:

fit0 <- ppm(lansing ~marks + polynom(x,y,3)) fit1 <- ppm(lansing ~marks * polynom(x,y,3)) anova(fit0, fit1, test="Chi")

slide-174
SLIDE 174

Segregation test

Spatial point patterns SSAI Course 2017 – 101

Likelihood ratio test of segregation in Lansing Woods data:

fit0 <- ppm(lansing ~marks + polynom(x,y,3)) fit1 <- ppm(lansing ~marks * polynom(x,y,3)) anova(fit0, fit1, test="Chi") Analysis of Deviance Table Model 1: ~marks + (x + y + I(x^2) + I(x * y) + I(y^2) + I(x^3) + I(x^2 * y) + I(x * y^2) + I(y^3)) Poisson Model 2: ~marks * (x + y + I(x^2) + I(x * y) + I(y^2) + I(x^3) + I(x^2 * y) + I(x * y^2) + I(y^3)) Poisson Npar Df Deviance Pr(>Chi) 1 15 2 60 45 612.57 < 2.2e-16 ***

slide-175
SLIDE 175

Fitted intensity

Spatial point patterns SSAI Course 2017 – 102

fit1 <- ppm(lansing ~marks * polynom(x,y,3)) plot(predict(fit1))

predict(fit1)

blackoak hickory maple misc redoak whiteoak
slide-176
SLIDE 176

Inhomogeneous multitype K function

Spatial point patterns SSAI Course 2017 – 103

Inhomogeneous K function can be generalised to inhomogeneous multitype K function.

fit1 <- ppm(lansing ~marks * polynom(x,y,3)) lamb <- predict(fit1) plot(Kcross.inhom(lansing, "maple","hickory", lamb$markmaple, lamb$markhickory))

0.00 0.05 0.10 0.15 0.20 0.25 0.00 0.05 0.10 0.15 0.20 r (one unit = 924 feet) K inhom, maple, hickory(r) K^ inhom, maple, hickory iso (r) K^ inhom, maple, hickory trans (r) K^ inhom, maple, hickory bord (r) K inhom, maple, hickory pois (r)
slide-177
SLIDE 177

Spatial point patterns SSAI Course 2017 – 104

Multitype Gibbs models

slide-178
SLIDE 178

Conditional intensity

Spatial point patterns SSAI Course 2017 – 105

The conditional intensity λ(u, m | x) is essentially the conditional probability of finding a point of type m at location u, given complete information about the rest of the process x.

u

slide-179
SLIDE 179

Multitype Strauss process

Spatial point patterns SSAI Course 2017 – 106

> ppm(amacrine ~marks, Strauss(r=0.04)) Stationary Strauss process First order terms: beta_off beta_on 156.0724 162.1160 Interaction: Strauss process interaction distance: 0.04 Fitted interaction parameter gamma: 0.4464

slide-180
SLIDE 180

Multitype Strauss process

Spatial point patterns SSAI Course 2017 – 107

> rad <- matrix(c(0.03, 0.04, 0.04, 0.02), 2, 2) > ppm(amacrine ~ marks, MultiStrauss(radii=rad,types=c("off", "on"))) Stationary Multitype Strauss process First order terms: beta_off beta_on 120.2312 108.8413 Interaction radii:

  • ff
  • n
  • ff 0.03 0.04
  • n

0.04 0.02 Fitted interaction parameters gamma_ij:

  • ff
  • n
  • ff 0.0619 0.8786
  • n

0.8786 0.0000

slide-181
SLIDE 181

Website

Spatial point patterns SSAI Course 2017 – 108

www.spatstat.org