[R-sig-Geo] marked poisson process using a quadrature scheme and covariates in 'spatstat'
Roman Hornung
romanhornung at web.de
Thu May 5 17:10:30 CEST 2011
Thank you both very much!
Some more details on the data: The individual roads are most of the time represented by more than two points. The road data consists of about 800000 points representing around 75000 roads.
I tried to convert it to a linnet-object, but got the error (translated): "error in matrix(FALSE, np, np): too many elements specified", even when I set the memory limit to the maximal possible value (on a 32-bit computer).
So I must probably give up that approach.
I must admit, I wasn't really aware, that the intensity is not defined at locations with no roads passing through. However maybe, it is negligible, that the events can only occur on roads and that there are "gaps" in the prediction, since the network of roads is very dense.
What to you think? All the other covariate are proper spatial covariates, so it would be approriate to use a spatial poisson process.
Marcelino, you wrote:
"By the way, instead of a quadrature scheme you could also use
rsyst to generate directly a grided ppp with "real"
observations and then mark the points at will."
Does that mean, it is irrelevant for estimation, which marks points have, that aren't at locations, where
the target variable is observed?
In the latter case, I would be able to use the quadrature scheme nevertheless, with dummy points on the roads and random marks, thereby circumventing the problem of converting the road data to an image.
However I noticed, that ppm doesn't allow continuous marks in the trend formula. Is there any other package that could handle this?
Perhaps I could use the code of the corresponding function of such a package to modify the ppm-function in spatstat. Otherwise, if unavoidable, I would have to discretize the daytime.
Regards
Roman
-----Ursprüngliche Nachricht-----
Von: "Rolf Turner" <r.turner at auckland.ac.nz>
Gesendet: 05.05.2011 02:08:26
An: "Roman Hornung" <romanhornung at web.de>
Betreff: Re: [R-sig-Geo] marked poisson process using a quadrature scheme and covariates in 'spatstat'
>On 04/05/11 23:33, Roman Hornung wrote:
>> Hello everyone,
>>
>> My data consists of marked points and several covariates, whereby the
>> marks are the time points of the observations. The problem is, that
>> one of the covariates is hard to handle as an image. This covariate
>> represents the type of roads. As there aren't roads at every location
>> of the map, one cannot specify the value of the covariate at any point
>> on a grid, which is necessary to specify an image. To tackle this, I
>> wanted to use a quadrature scheme and use points on the roads as dummy
>> points instead of a data point pattern as the outcome variable. The
>> problem I now encounter is, that I can't give marks to the dummy
>> points, since they are no "real" observations (and omitting the marks
>> gives an error).
>> Does somebody know, what to do in such a situation?
>>
>> Thank you very much in advance! Any tips are appreciated much!
>
>I am somewhat puzzled by what you are trying to do. Covariates may be
>used to
>model the intensity of a point pattern. The intensity is defined at
>every point of
>the domain of definition of the pattern; in practice it must be defined
>at every
>point of the observation window.
>
>So in your case the objective would be to specify the intensity
>"lambda(u)" in terms
>of your covariates at every point "u" of your observation window. You
>say that
>one of your covariates is ``type of road''. Obviously if no road passes
>through "u"
>then there is no ``type of road'' ***at*** "u". So how does the
>intensity at u depend
>on ``type of road''? Clarify that idea, and all of your problems will
>disappear.
>
>One idea, which you may be subconsciously entertaining, is that the
>intensity at
>"u" depends on the type of the road nearest to u. Or it might depend on the
>types of all roads weighted in some way by the distance of the roads
>from "u".
>Get it clear in your mind first how you want to model the intensity. Then
>build your image, or images, in terms of your roads data in a manner
>consistent
>with your modelling criteria.
>
>Note that the distmap() and distfun() functions in "spatstat" will allow
>you to determine the
>distance from a given point to the nearest road (if the roads are
>represented as "psp"
>objects).
>
> cheers,
>
> Rolf Turner
More information about the R-sig-Geo
mailing list