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

R package:s spatstat.explore and spatstat.model need spatstat.random 2.2.0.7 but not available?

I try to install from github spatstat.explore and spatstat.model but this does not work because spatstat.random 2.2.0.7 is needed. I cannot find the latter. Is the development not yet finalised?
SYC
  • 65
  • 5
0
votes
1 answer

Reference bandwidth smoothing in spatstat

Is there any way to use reference bandwidth selection for kernel smoothing in spatstat package?
fgh
  • 3
  • 1
0
votes
0 answers

Internal error: X pixel values were NA, even after projection

I am using a library (sparr), which relies on spatstat. After executing a function from sparr, namely LSCV.risk() I am getting the following error: Internal error: 1498 pixel values were NA, even after projection I was able to track it down to…
four-eyes
  • 10,740
  • 29
  • 111
  • 220
0
votes
1 answer

Smoothed partial residuals of a covariate in a point process model in spatstat

I am using spatstat to build point process models using the ppm function but I have problems in validation, when I use the residual plot parres to understand the effect of a covariate. The model is composed of 1022 locations of bird occurrences…
0
votes
1 answer

How do you format a hyperframe in spatstat to be able to run the "mppm" function for point process models?

Below is a list of 3 point patterns with measured tree data. ppp_list [[1]] Marked planar point pattern: 3 points Mark variables: SPCD, DIA, HT window: polygonal boundary enclosing rectangle: [-9215316, -9215301] x [8549428, 8549443]…
0
votes
0 answers

Tessellation error in spatstat - Error in as.im.default(image) : Can't convert X to a pixel image

I have been dealing with this for several days and can't find a way out. I'm using spatstat in R for spatial analysis of my cells. I have follow some tutorials, but as always happens, things don't come out as they should. I have some xy coordinates…
0
votes
1 answer

Converting intensities to probabilities in ppp

Apologies for the overlap with existing questions; mine is at a more basic skill level. I am working with very sparse occurrences spanning very large areas, so I would like to calculate probability at pixels using the density.ppp function (as…
aqeco
  • 5
  • 1
0
votes
1 answer

Custom smoothing kernel

I would like to use Smooth.ppp in spatstat to calculate a sort of "moving average" according to a specific function. The specific distance-dependent weights I would like to use are given by a function wt; for simplicity wt=function(x,y)…
aqeco
  • 5
  • 1
0
votes
1 answer

Internal error: Unable to map submodel to full model

I sometimes get this error while running an anova.mppm after fitting mppm models, but then I also get the anova table output along with it, which looks fine. I am wondering if it is okay to use the anova results for my analyses even if I get this…
0
votes
1 answer

cutoff error using custom kernel in Smooth.ppp

I need to use a custom kernel with the Smooth function, but attempting this throws an error even though I specify cutoff: Error: The argument ‘cutoff’ is required when a non-Gaussian kernel is specified and scalekernel=FALSE n=4;…
aqeco
  • 5
  • 1
0
votes
1 answer

Why Strauss model restricts gamma < 1 but Strauss-Hard allows gamma > 1?

I'm very confused about why the Strauss model only allows 01 in Strauss-Hard to represent the clustering behavior of points. What is the mathematical reason behind this difference? And why can't Stauss have…
0
votes
1 answer

Convert spatstat functions to C++ to circumvent memory-limitation

I am using spatstat to estimate the risk of pest introduction and spread from roads, highways, and other roadways. However, I believe I am running into memory-limitation issues; my data is at a continental scale and my computer only has 16 GB of…
Josh Persi
  • 83
  • 1
  • 7
0
votes
2 answers

Rendering of point pattern from a data frame using Spatstat is taking too long to execute in R/Shiny

I am building a shiny app to perform spatial analysis using the spatstat package. I do not have any issue exciting the code. But rendering the map, points and contours are taking quite a long time to load on the map. The data frame has almost 87,000…
0
votes
1 answer

Represent a colored polygon in ggplot2

I am using the statspat package because I am working on spatial patterns. I would like to do in ggplot and with colors instead of numbers (because it is not too readable), the following graph, produced with the plot.quadratest function: Polygone The…
baptbapt
  • 23
  • 3
0
votes
1 answer

Testing significance of Strauss parameters in mppm model

I have a follow up question from my previous post. Upon creating mppm models like these: Str <- hyperframe(str=with(simba, Strauss(mean(nndist(Points))))) fit0 <- mppm(Points ~ group, simba) fit1 <- mppm(Points ~ group, simba, interaction=Str, …