Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is.multitype.lppm

Test Whether A Point Process Model is Multitype


Description

Tests whether a fitted point process model on a network involves “marks” attached to the points that classify the points into several types.

Usage

## S3 method for class 'lppm'
is.multitype(X, ...)

Arguments

X

Fitted point process model on a linear network (object of class "lppm") usually obtained from lppm.

...

Ignored.

Details

“Marks” are observations attached to each point of a point pattern. For example the chicago dataset contains the locations of crimes, each crime location being marked by the type of crime.

The argument X is a fitted point process model on a network (an object of class "lppm") typically obtained by fitting a model to point pattern data on a network using lppm.

This function returns TRUE if the original data (to which the model X was fitted) were a multitype point pattern.

Note that this is not the same as testing whether the model involves terms that depend on the marks (i.e. whether the fitted model ignores the marks in the data). See the Examples for a trick for doing this.

If this function returns TRUE, the implications are (for example) that any simulation of this model will require simulation of random marks as well as random point locations.

Value

Logical value, equal to TRUE if X is a model that was fitted to a multitype point pattern dataset.

Author(s)

See Also

Examples

fit <- lppm(chicago ~ x)
  is.multitype(fit)
  # TRUE because chicago data are multitype

  ## To check whether the model involves marks:
  "marks" %in% spatstat.utils::variablesinformula(formula(fit))

spatstat.linnet

Linear Networks Functionality of the 'spatstat' Family

v2.1-1
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Ottmar Cronie [ctb], Tilman Davies [ctb], Greg McSwiggan [ctb], Suman Rakshit [ctb]
Initial release
2021-03-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.