Questions tagged [spatstat]

spatstat is an R package for analysing spatial data, mainly Spatial Point Patterns.

spatstat is an R package for analysing spatial data, mainly Spatial Point Patterns. It also supports three-dimensional point patterns, and space-time point patterns in any number of dimensions. The package contains over 1000 functions for plotting spatial data, exploratory data analysis, model-fitting, simulation, spatial sampling, model diagnostics, and formal inference. Data types include point patterns, line segment patterns, spatial windows, pixel images and tessellations.

Resources:

441 questions
0
votes
1 answer

Bootstrapping standard errors of cluster point process model (kppm)

I'd like to report the standard error of the clustering parameters (kappa, sigma) of an inhomogeneous Thomas point process model that I've fitted in spatstat. Yue and Loh (2015) reported doing this by a parametric bootstrap. I'm not very experienced…
KK Li
  • 5
  • 2
0
votes
1 answer

How to plot contour maps and display average of the mark(associated with x,y) for each contour level

I have a contour map in spatstat generated from the intensity function of a point pattern X (like "location of the trees"). Each x,y coordinates in this point pattern is marked with a corresponding third vector (like "diameter of the tree"). -->cf…
saccente
  • 21
  • 1
0
votes
2 answers

spatstat wiht R: Error with defining the window of spatial point pattern

Please see below image. This image is created by first converting a two-column data frame into a study window (call it study_win) using as.owin, and then plotting another two-columns data-frame (call it study_points)on top of the window. It is clear…
nobody
  • 815
  • 1
  • 9
  • 24
0
votes
1 answer

Comparing estimates of Ripley's K function using Matlab and R

I am using the following Matlab code to estimate Ripley's K function. a = 0; b = 50; C_x = a + (b-a).*rand(100,1); C_y = a + (b-a).*rand(100,1); locs = zeros(length(C_x),2); locs(:,1) = C_x; locs(:,2) = C_y; dist = a:1:b; K_t = RipleysK(locs,…
0
votes
1 answer

Simulate minefields with two samples in the same plot in R

I am trying to simulate a minefield by plotting two Poisson distributed samples in the same plot, one with a higher intensity and smaller area than the other. This is the minefield and the other is just noise (stones, holes, metal) seen as points. I…
0
votes
0 answers

rpy2 convert numpy array into ppp (point pattern) spatstat

I have a numpy array as given, corresponding to x,y coordinates. I am searching for a way to convert this into ppp point structure to perform spatial analysis using spatstat tool in R via rpy2. points=array([[ 181.124067 , 58.2029135], [ …
Mehtab Pathan
  • 443
  • 4
  • 15
0
votes
1 answer

What is the relationship between marks and covariates in point process

I am confused about marks and covariates in point process. I am trying to create a model of a marked point pattern with few covariates in R by using spatstat, but I am not sure the relationship between marks and covariates. Could anyone help…
0
votes
0 answers

Installing spatstaton R studio

I am attempting to upload the R package "spatstat" in R studio, and am reciceving the following warning message. Any ideas what I am doing wrong? install.packages("spatst") Installing package into ‘C:/Users/Mallarie/Documents/R/win-library/3.1’…
0
votes
1 answer

R-spatstat im with square pixels? (for export to Arc raster)

I'm having a problem exporting a density im from spatstat to a file format readable by ArcGIS. Here's my code library(raster) library(spatstat) library(maptools) library(sp) # make a spatstat ppp with California boundary as window ca <-…
user3856539
0
votes
1 answer

Error with Chi-squared dispersion test in R

I am very new to R and am attempting to determine whether a shape file containing ~500k points is randomly distributed. and I keep getting the same error message no matter what I enter for the arguments. Here is what I have from the start: >…
0
votes
1 answer

envelope function (spatstat) - error "unused arguments"

I would like to ask your help for finding the reason why when I use the function envelope, my arguments are not accepted, but defined "unused arguments". The data I'm using are ppp without marks and I would like to create a L function graph with…
0
votes
2 answers

Obtaining the subset of points which are outside a specified irregular polygon using {spatstat}

I have a large set of points (latitude and longitude) constrained by a complex polygon. However some of the points are not within the bounds of the polygon, and I would like to subset these points from the original data frame (not the ppp object,…
user3389288
  • 992
  • 9
  • 30
0
votes
1 answer

R package spatstat: How to use point process model covariate as factor when pixel image values are numeric

I am trying to model a point process with an image covariate using the ppm() function in the spatstat package in R. I convert my raster to an im object for use with spatstat, and I run into a problem using the im as a covariate in the model. The…
thegowda
  • 57
  • 1
  • 6
0
votes
1 answer

spatstat: plot.msr error message

I have created an error free ppm in spatstat (R library) together with the associated residuals. It is based around approximately 25,000 data points. However, when I attempt to plot the residuals using plot.msr I get the following message: Error:…
SimonH
  • 1
  • 1
0
votes
1 answer

Applying R package spatstat functions to one-dim data?

Functions in spatstat are mainly made for 2-3-dim data analysis. Is there a good possibility to apply them to one-dim data? There is huge capability for class ppp in 2-dim. There is a very general class ppx for arbitrary dimensions - but this is…