Learn R Programming

lgcp (version 0.9-1)

as.stppp.stapp: as...

Description

as.stppp.stapp function

Usage

## S3 method for class 'stapp':
as.stppp(obj, popden, n=100, ...)

Arguments

obj
an object of class stapp
popden
a 'spatialAtRisk' of sub-class 'fromXYZ' object representing the population density, or for better results, lambda(s) can also be used here. Cases are distributed across the spatial region according to popden. NULL by default, which has the effect of assi
n
if popden is NULL, then this parameter controls the resolution of the uniform. Otherwise if popden is of class 'fromFunction', it controls the size of the imputation grid used for sampling. Default is 100.
...
additional arguments

Value

  • ...

Details

A function to convert stapp objects to stppp objects for use in lgcpPredict. The regional counts in the stapp object are assigned a random location within each areal region proportional to a population density (if that is available) else the counts are distributed uniformly across the observation windows.