Questions tagged [spatstat]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
65 views

Kernel density estimation of polygonal window returning NA values

I am using the spatstat package to compute kernel density estimates around an unmarked planar point pattern using a polygonal observation window. The code in the following reprex seems to work as ...
Josh Persi's user avatar
0 votes
1 answer
18 views

Using studpermu.test in spatstat on hyperframes with only 2 point patterns per group

I seem to be having an issue implementing studpermu.test on my point pattern data. The R documentation for studpermu.test states the minimum number of point patterns per group for between group ...
MTR's user avatar
  • 1
0 votes
1 answer
56 views

What is the bivariate mark variogram (MVF) analyzer for numeric markers in spatstat?

My goal is to use bivariate marks variogram to analyze correlations between trees with different radial levels. But I didn't find a bivariate function about numeric markers, tried the markcorr ...
jingyu's user avatar
  • 1
0 votes
1 answer
49 views

Fisher transformation

I have data on earthquake epicenters. While I am trying to fit a LGCP to it, I get the error message as below when I print the result of my model: Inhomogeneous Cox point process model Fitted to point ...
Salma's user avatar
  • 13
1 vote
1 answer
40 views

How to use inhomogeneous models fitted in the calculation of envelopes in spatstat?

This question involves conceptual issues, however, it also involves code. Given a heterogeneous pattern of points, dependent on terrain slope and elevation, for example, obtained from a fit of a ...
Tieygons's user avatar
0 votes
1 answer
70 views

What would be the procedure in spatstat for an quantitatively bivariate marked analysis of 1 or more pattern of points?

Given a pattern of points X1 and X2, each with quantitative marks, for example growth as diameter. What would be the strategy for bivariate comparison between the X1 and X2 pattern points, using a ...
Tieygons's user avatar
1 vote
2 answers
39 views

How to convert a Mean Cluster size result that is in [pixel image] to the number of mean points per cluster in spatstat?

Given a inhomogeneous cluster model, associated with a variable Z as an object of class 'im', how to convert the result of the number of mean points per cluster (Mean cluster size) in pixel image to ...
Tieygons's user avatar
0 votes
2 answers
106 views

'invalid permissions' in VS Code running quarto file with R code

I'm running R code in a .qmd file using VS Code and plot results using r.plot.useHttpgd. In various cases I get an *** caught segfault *** error. Reproducible example library(spatstat) plot(amacrine) ...
samu's user avatar
  • 45
0 votes
1 answer
67 views

Calculate area from binary image

Ahead, I'm not able to provide a minimum working example since I don't know how. I have an binary mask in an owin. Basically, my data contains five clumped dots of different size. I try to get their ...
Qiyuan's user avatar
  • 119
1 vote
3 answers
61 views

R Spatstat: Identify nearest neighbours for further use

I have a dataframe with 488 GPS points (long and lat). For each 488 points I would like to find their 2 closest neighbours. So far I have created a point pattern object and computed the distance from ...
bellbyrne's user avatar
0 votes
1 answer
51 views

Is where a way to find close pairs within a specific box eround each point in spatstat?

I'm working with spatstat package in R. I have marked point patterns with mark variables Name, boxA, boxB. BoxA and boxB are dimensions of a rectangle around each point (bounding boxes). here is an ...
Sergej S's user avatar
0 votes
1 answer
35 views

Appropriate covariate for cdf.test.ppp in spatstat

I am trying to assess the spatial homogeneity of cells I have cultured. I have successfully managed to obtain the x,y coordinates of the cells in a square image using Image J (an image of cell ...
작은과학자's user avatar
2 votes
1 answer
64 views

Plotting quadrat counts as an intensity map in R

I have a point data set of crimes for a city. Using quadratcount() through the spatstat package, I plotted the quadrat counts of this data set. Figure 1 shows an image of the counts of data points per ...
Fritz's user avatar
  • 21
0 votes
0 answers
23 views

Question about an inhibition process spatstat

I am working with a data set of a pattern of spatial points that present an inhibition process but caused by angles, that is, they repel each other according to a given angle (azimuth of 0, 45, 90, ...
jesus andrades's user avatar
1 vote
1 answer
45 views

variability in spatstat envelope() results

I am using envelope() to create simultaneous critical envelopes. I noticed that when I ran 39 simulations that the envelope I created changed the interpretation for CSR when I repeated the simulation ...
JRS04473's user avatar
0 votes
1 answer
22 views

SPATSTAT code for molecular pattern for a image

Can't interpret X as a point pattern, ask for help! library(imager) library(spatstat) Read image img <- load.image("C:/Users/yyan2/Documents/Dec 21/F10F.jpg") img_gray <- grayscale(...
user21605328's user avatar
0 votes
1 answer
82 views

Testing inhomogeneous patterns in spatstat

I applied the permutation test on my data to test if they are inhomogeneous, present on page. 689 of the spatstatbook. As an example of the bronze filter data. To do so, I unmarked my points and ran ...
Tieygons's user avatar
0 votes
1 answer
57 views

How to add/join several g functions to obtain intra and interspecific spatial patterns in spatstat?

Considering a plant community, whose one of the objectives is to investigate intra and interspecific spatial patterns, I would like to know whether by evaluating the patterns of each pair equal (intra)...
Tieygons's user avatar
1 vote
2 answers
64 views

How can I convert a 'pp3' dot pattern into an 'im' object in spatstat?

My goal is to create an im object from terrain elevation data (pp3's z-axis), similar to bei.extra ($elev and $grad). I started by creating a pp3 object from my data set: x <- elev_test$x y <- ...
Tieygons's user avatar
0 votes
1 answer
38 views

spatstat or R alternative to ESRI Point Density Tool?

I am trying to figure if it is best possible way to replicate ESRI point density tool in spatstat R package. I got bunch of archaeological sites location with associated size and would like to compute ...
Michal Michalski's user avatar
0 votes
1 answer
54 views

It's possible to create envelopes for combinations of mark correlations with spatstat , generated from markcrosscorr?

I would like to know if it is possible to create envelopes for combinations of mark correlations with spatstat , generated from markcrosscorr. In the example on page 645 of the book (2015), I saw that ...
Tieygons's user avatar
1 vote
2 answers
47 views

Is it reasonable to use AIC to rank point process models that are based on different likelihood functions (Poisson and Gibbs in this case)?

I am using spatstat version 3.0.2 to explore settlement patterns in archaeological data in five different periods throughout prehistory. I have formulated several point process models with different ...
A.M. Xenaki's user avatar
0 votes
1 answer
33 views

How can I improve the estimation for clustering models using kppm function in spatstat

I have simulated some point pattern from Thomas and MatClust models and, I was trying to fit the parameters of the model using kppm() function from spatstat. Nevertheless, I obtained a no good ...
Yeison Yovany Ocampo Naranjo's user avatar
0 votes
1 answer
72 views

Is there a way to compute the standard error for GAM models using effectfun() within spatstat?

I am using spatstat version 3.0.2 to explore settlement patterns in archaeological data in five different periods throughout prehistory. I have formulated several point process models with different ...
A.M. Xenaki's user avatar
0 votes
1 answer
26 views

Building kppm model from clusterfit parameters

Following the steps in the answer given here, I've fit Thomas cluster model parameters kappa and sigma to the pooled Kinhom functions of a set mppm intensity predictions. By "transferring" ...
SGJ's user avatar
  • 1
0 votes
1 answer
41 views

'spatstat' package: Fitting cluster process models

I have several questions regarding fitting cluster process models using the spatstat package, to solve a problem I am working on. Is there a recommended minimum sample size consideration when fitting ...
DeeJ's user avatar
  • 3
0 votes
1 answer
134 views

How to interpret the different results of pcfcross, markconnection and markcorrelation function?

I want analyze the spatial correlation between different life history stages of different tree species. I used three different summary statistics, namely, pcfcross, markconnect and markcorr functions. ...
Puion's user avatar
  • 3
0 votes
1 answer
39 views

How to make the covariate in rhohat() a factor?

I'm trying to use the rhohat() function to estimate changes and I have my ppp file and image file. When I run the fuction I get this error Error in spatialCovariateEvidence.exactppm(model = list(X = ...
Favour Onyido's user avatar
1 vote
1 answer
50 views

Show all symbols in legend in spatstat

I'm plotting a forest with trees as in the sample data lansing in spatstat. My code is as in this example: plot(lansing, cols=rainbow(length(unique(lansing$marks))), leg.args=list(y.intersp = ...
Qiyuan's user avatar
  • 119
1 vote
1 answer
42 views

Using nndist.ppx to obtain near neighbor distances in multidimensional point pattern

I am fairly new to R and programming in general, so I appreciate your input. I'm trying to obtain the nearest neighbor distances for a set of points. My data consists of the scores on the first 4 ...
MJA's user avatar
  • 11
0 votes
0 answers
35 views

Analysis of replicated spatial point patterns (bayesian way)

Lately, I have been interested in spatial Point Patterns analysis. I have been using spatstat and other packages. However, the resources (tutorials and vignettes) regarding replicated point patterns ...
Daniel Manrique's user avatar
0 votes
1 answer
102 views

Is there a way to perform quadratcount() in spatstat without ignoring the marks?

Imagine I have a point pattern distribution in a square and all points have marks (i.e. plant trait data). I want to divide this square in f.e. 4 quadrats. Now I am interested in the spatial ...
Anton's user avatar
  • 1
0 votes
1 answer
67 views

Converting Shape file from GIS into a PPP using spatstat UK

I am trying to create a PPP in spatstat using my study area (a large polygon made up of individual polygons) from a shape file from GIS. I have been following: Handling shapeles in the spatstat ...
Juniper's user avatar
1 vote
1 answer
69 views

Model a 3D Point Pattern using spatstat

Is there any way to fit a spatial statistical model to 3d data in spatstat? I have tried using the functions such as ppm and kppm but they are not working for pp3
Justin Miner's user avatar
0 votes
1 answer
127 views

Error: x,y coords given but no window specified (spatstat)

I am generating a landscape pattern that evolves over time. The problem with the code is that I have clearly defined a window for the object bringing up the error but the window is not being ...
OpenSauce's user avatar
  • 354
0 votes
1 answer
32 views

Gibbs models for numerically marked data?

I am analyzing data similar to the "anemones" data in spatstat, where my data also consists of disks of varying diameters. My goal is to test for significant regularity, or inhibition ...
Sriram Ramamurthy's user avatar
0 votes
1 answer
72 views

Simulate a list of kppm objects in R spatstat

I would like to use envelope simulation on a list of kppm objects. I have a point dataset that is in a grid pattern. I would like to shift each point such that its position in the cell is random, then ...
proximacentauri's user avatar
0 votes
1 answer
51 views

Area under the curve for Kcross: Multitype K Function

I am using spatstat to run Kcross: Multitype K Function (Cross-type). Here is my data set and here is the script plotting K Cross df <- read.csv(file = "trees_rocks.csv") df.test <- ...
Wolfgang's user avatar
0 votes
0 answers
67 views

draw figures on a map with `sf`

I am struggling to find a systematic way to convert coordinates and geometries to km. Let's say I have a .shp file, which I read with st_read. I want to draw a circle of radius 10 kms around a city. I ...
altroware's user avatar
  • 930
0 votes
1 answer
60 views

Receiving different measured values from crossK and lohboot

I have a marked ppp dataset looking at crimes and their relation to locations. I am performing an inhomogeneous cross-K using the Kcross.inhom, and am using lohboot to bootstrap confidence intervals ...
palsi's user avatar
  • 1
0 votes
1 answer
64 views

Analysing polygon marked point patterns using spatstat in R

I have a dataset (data) I want to analyse using spatstat in R. The observed area is a polygon. The marks for my data are numeric values, 1 and 0. If the spot (circle) has a mark of 0, it will be white,...
MK Huda's user avatar
  • 627
0 votes
1 answer
44 views

How to change the pch in plot in categorically marked point pattern using spatstat in R

I have the data here data. I want to plot the categorically marked point pattern using spatstat in R. I have tried doing this x = c(3,0.5,1,0,0,0,2,2.5,5.5, 16,21,26,28,40, 47, 52, 58, 60, 65, 63, 63, ...
MK Huda's user avatar
  • 627
0 votes
2 answers
76 views

Error: objects 'ripras', 'as.ppp', 'delaunay' are not exported by 'namespace:spatstat'

I got following error whie executing the code. Code:install.packages("ithir", repos="http://R-Forge.R-project.org") Error: WARNING: Rtools is required to build R packages but is ...
bidhan ghimire's user avatar
0 votes
1 answer
96 views

How to make a better plot with label for marked point patterns using spatstat in R

I have marked point pattern data data. I want to plot the marked point pattern where the marks are only valued at 1 and 0 hence there are two colours only. This is what I have done so far x = c(3,0.5,...
MK Huda's user avatar
  • 627
1 vote
2 answers
115 views

How to get the best polygon point pattern data in spatstat analysis in R

I have a dataset of spatial locations data. I want to do a point pattern analysis using the spatstat package in R using this data. I want the best polygon area for the analysis instead of the ...
MK Huda's user avatar
  • 627
0 votes
1 answer
51 views

Spatstat: Cluster processes for interactions in marked point patterns?

I am trying to identify clustering patterns between different marks using point process models. Multitype Strauss is the only model I have found thus far which can compare interactions between ...
user4336927's user avatar
1 vote
1 answer
81 views

spatstat: Multidimensional Space-Time Point Pattern

I'm trying to model a Multidimensional Space-Time Point Pattern (ppx object from spatstat package). But I didn't find any way at package documentation. I tried this: library(spatstat) set.seed(2022) ...
oespinozah's user avatar
1 vote
1 answer
617 views

R package 'spatstat' not loading

I have downloaded and installed the 'spatstat' package multiple times, including by downloading the files. But every time I try to run it i get this error Failed with error: ‘package ‘spatstat.data’ ...
user avatar
0 votes
3 answers
210 views

R spatstat, plot function

In this figure, the axes are not displayed on the plot. How to fix it? Can anybody help me, thank you! plot(swedishpines, axes=TRUE) > dput(swedishpines) structure(list(window = structure(list(...
Puion's user avatar
  • 3
2 votes
1 answer
62 views

Searching for a way to use `linearKEuclid` and corresponding functions of `spatstat`

My goal is to analyse simple point patterns on linear networks with respect to Euclidean instead of shortest-path distance. For the latter distance metric, my analysis relies on linearK() and related ...
Friede's user avatar
  • 1,567

1
2 3 4 5
9