SlideShare a Scribd company logo
INTRODUCTION TO SPATSTAT
Richard W Wamalwa1 - MSc., MBA(Finance), BSc.
1Directorate of Academic Quality Assurance,
JKUAT
RM 610-Environmental, Spatial, GIS, 2011
OUTLINE
Introduction to Spatstat
Exploratory data analysis
Multiple point patterns
Reference
INTRODUCTION TO SPATSTAT
Spatstat is a contributed R package for analysing
spatial data which supports:
a. creation, manipulation and plotting of point
patterns
b. exploratory data analysis
c. simulation of point process models
d. parametric model-fitting
e. hypothesis tests, residual plots, diagnostics
INTRODUCTION – CONT’D
# Getting help in R
>help(spatstat)
#Accessing spatstat in R
>library(spatstat)
>data(swedishpines)
x <- swedishpines
>plot(x)
>summary(x)
#To get an impression of local spatial variations in
intensity
>plot(density(x, 10))
> plot(density(swedishpines, sigma = 10))
INTRODUCTION – CONT’D
#10 - chosen value for the standard deviation of
the Gaussian smoothing kernel.
>contour(density(x,10),axes=FALSE)
#To see a list of all methods available in R for a
particular generic function such as plot:
>methods(plot)
#To see a list of all methods that are available for a
particular class such as ppp:
>methods(class = "ppp")
EXPLORATORY DATA ANALYSIS
Spatstat is designed to support exploratory data analysis
for point patterns e.g. quadrat counting.
The study region is divided into rectangles (‘quadrats’) of
equal size, and the number of points in each rectangle is
counted.
Q <- quadratcount(X, nx = 4, ny = 3); <Q
plot(x)
plot(Q, add = TRUE, cex = 2)
plot(Q, cex = 0.5, pch = "+")
den <- density(Q, sigma = 70)
plot(den)
plot(Q, add = TRUE, cex = 0.5)
K <- Kest(x)
plot(K)
MULTIPLE POINT PATTERNS
Multilpe point patterns is a marked point pattern
in which the marks are a categorical variable.
data(lansing)
lansing
summary(lansing)
plot(lansing)
plot(split(lansing))
The result of split(lansing) is a list of point
patterns.
To extract one of these patterns, e.g. the hickories,
hick <- split(lansing)$hickory
plot(hick)
MULTIPLE POINT PATTERNS
a <- plot(lansing)
legend(-0.25, 0.5, names(a), pch = a)
Lansing Woods data
Is the study region divided into domains
where a single tree species dominates, or are
they different species randomly
interspersed?
REFERENCE
Adrian Baddeley (2008). Analysing spatial point
patterns in R. Adrian.Baddeley@csiro.au;
adrian@maths.uwa.edu.au.

More Related Content

PPTX
Time series data mining techniques
PDF
CLIM Fall 2017 Course: Statistics for Climate Research, Spatial Data: Models ...
PDF
Spatial Analysis with R - the Good, the Bad, and the Pretty
PPT
5.4 randomized datastructures
PDF
Lecture 6
PDF
Pca ppt
PDF
QMC: Undergraduate Workshop, Introduction to Monte Carlo Methods with 'R' Sof...
PPTX
2D Transformation
Time series data mining techniques
CLIM Fall 2017 Course: Statistics for Climate Research, Spatial Data: Models ...
Spatial Analysis with R - the Good, the Bad, and the Pretty
5.4 randomized datastructures
Lecture 6
Pca ppt
QMC: Undergraduate Workshop, Introduction to Monte Carlo Methods with 'R' Sof...
2D Transformation

What's hot (20)

PDF
Using Principal Component Analysis to Remove Correlated Signal from Astronomi...
PDF
Computer Graphics & linear Algebra
PDF
Machine learning (11)
PDF
Big Data Analysis with Signal Processing on Graphs
PPTX
Principal component analysis
PPTX
Geometric transformation 2d chapter 5
PDF
Fundamentals cig 4thdec
PPTX
2d-transformation
PPTX
Principal Component Analysis For Novelty Detection
DOCX
Reflection, Scaling, Shear, Translation, and Rotation
PDF
Ijetcas14 605
PPT
Chapter 3 ds
PDF
Social network-analysis-in-python
PPT
lecture 11
PPT
Spline Interpolation
PPT
minimum spanning trees Algorithm
PDF
GDRR Opening Workshop - Bayesian Inference for Common Cause Failure Rate Base...
DOCX
Do you know matrix transformations
PPTX
Two dimensionaltransformations
PDF
Dask glm-scipy2017-final
Using Principal Component Analysis to Remove Correlated Signal from Astronomi...
Computer Graphics & linear Algebra
Machine learning (11)
Big Data Analysis with Signal Processing on Graphs
Principal component analysis
Geometric transformation 2d chapter 5
Fundamentals cig 4thdec
2d-transformation
Principal Component Analysis For Novelty Detection
Reflection, Scaling, Shear, Translation, and Rotation
Ijetcas14 605
Chapter 3 ds
Social network-analysis-in-python
lecture 11
Spline Interpolation
minimum spanning trees Algorithm
GDRR Opening Workshop - Bayesian Inference for Common Cause Failure Rate Base...
Do you know matrix transformations
Two dimensionaltransformations
Dask glm-scipy2017-final
Ad

Similar to Introduction to spatstat (20)

PDF
SPATIAL POINT PATTERNS
PDF
10. R getting spatial
PDF
Finding Meaning in Points, Areas and Surfaces: Spatial Analysis in R
PDF
R getting spatial
 
PDF
Introduction to spatial data analysis in r
PPTX
Exploratory Spatial Data Analysis spatial data analysis and interpretation.pptx
PPT
RichardPughspatial.ppt
PPT
GEOSTATISTICAL_ANALYST
PPT
Janoska - Methods for Description of Distribution of Species Obtained by Quad...
PDF
Manuale di PAST
PPT
3A_1_spatially clustered associations
PDF
Table of Useful R commands.
PDF
Variograms
PDF
Data Exploration and Visualization with R
PDF
ODP
Geospatial Data in R
PDF
10. Getting Spatial
 
PPT
Lecturer1-Introduction to statistics1.ppt
PPTX
Introduction to Data Visualization for Agriculture and Allied Sciences using ...
PDF
DMTM 2015 - 04 Data Exploration
SPATIAL POINT PATTERNS
10. R getting spatial
Finding Meaning in Points, Areas and Surfaces: Spatial Analysis in R
R getting spatial
 
Introduction to spatial data analysis in r
Exploratory Spatial Data Analysis spatial data analysis and interpretation.pptx
RichardPughspatial.ppt
GEOSTATISTICAL_ANALYST
Janoska - Methods for Description of Distribution of Species Obtained by Quad...
Manuale di PAST
3A_1_spatially clustered associations
Table of Useful R commands.
Variograms
Data Exploration and Visualization with R
Geospatial Data in R
10. Getting Spatial
 
Lecturer1-Introduction to statistics1.ppt
Introduction to Data Visualization for Agriculture and Allied Sciences using ...
DMTM 2015 - 04 Data Exploration
Ad

Recently uploaded (20)

PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Lesson notes of climatology university.
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
RMMM.pdf make it easy to upload and study
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
master seminar digital applications in india
PDF
Pre independence Education in Inndia.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Lesson notes of climatology university.
Microbial diseases, their pathogenesis and prophylaxis
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Computing-Curriculum for Schools in Ghana
TR - Agricultural Crops Production NC III.pdf
01-Introduction-to-Information-Management.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
GDM (1) (1).pptx small presentation for students
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
O7-L3 Supply Chain Operations - ICLT Program
RMMM.pdf make it easy to upload and study
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
master seminar digital applications in india
Pre independence Education in Inndia.pdf

Introduction to spatstat

  • 1. INTRODUCTION TO SPATSTAT Richard W Wamalwa1 - MSc., MBA(Finance), BSc. 1Directorate of Academic Quality Assurance, JKUAT RM 610-Environmental, Spatial, GIS, 2011
  • 2. OUTLINE Introduction to Spatstat Exploratory data analysis Multiple point patterns Reference
  • 3. INTRODUCTION TO SPATSTAT Spatstat is a contributed R package for analysing spatial data which supports: a. creation, manipulation and plotting of point patterns b. exploratory data analysis c. simulation of point process models d. parametric model-fitting e. hypothesis tests, residual plots, diagnostics
  • 4. INTRODUCTION – CONT’D # Getting help in R >help(spatstat) #Accessing spatstat in R >library(spatstat) >data(swedishpines) x <- swedishpines >plot(x) >summary(x) #To get an impression of local spatial variations in intensity >plot(density(x, 10)) > plot(density(swedishpines, sigma = 10))
  • 5. INTRODUCTION – CONT’D #10 - chosen value for the standard deviation of the Gaussian smoothing kernel. >contour(density(x,10),axes=FALSE) #To see a list of all methods available in R for a particular generic function such as plot: >methods(plot) #To see a list of all methods that are available for a particular class such as ppp: >methods(class = "ppp")
  • 6. EXPLORATORY DATA ANALYSIS Spatstat is designed to support exploratory data analysis for point patterns e.g. quadrat counting. The study region is divided into rectangles (‘quadrats’) of equal size, and the number of points in each rectangle is counted. Q <- quadratcount(X, nx = 4, ny = 3); <Q plot(x) plot(Q, add = TRUE, cex = 2) plot(Q, cex = 0.5, pch = "+") den <- density(Q, sigma = 70) plot(den) plot(Q, add = TRUE, cex = 0.5) K <- Kest(x) plot(K)
  • 7. MULTIPLE POINT PATTERNS Multilpe point patterns is a marked point pattern in which the marks are a categorical variable. data(lansing) lansing summary(lansing) plot(lansing) plot(split(lansing)) The result of split(lansing) is a list of point patterns. To extract one of these patterns, e.g. the hickories, hick <- split(lansing)$hickory plot(hick)
  • 8. MULTIPLE POINT PATTERNS a <- plot(lansing) legend(-0.25, 0.5, names(a), pch = a) Lansing Woods data Is the study region divided into domains where a single tree species dominates, or are they different species randomly interspersed?
  • 9. REFERENCE Adrian Baddeley (2008). Analysing spatial point patterns in R. Adrian.Baddeley@csiro.au; adrian@maths.uwa.edu.au.