Inhomogenous Poisson Point Process

What I have: points (t) in space and time where something happens (event) denoted 1 with covariate values (X, spatial covariates). I have also sampled the space and I have locations where there are no events denoted 0.

Intensity for the process: lambda(t) = exp(X(t)^{T} beta), where beta is the vector of parameters.

I want to fit an inhomogeneous Poisson Point Process model with the intensity function as above. I have a vector of 1’s and 0’s along with the corresponding covariate vales.

Is it possible to model this type of model in Stan? I have no idea how to go about it, since I don’t have “counts” per se.

Thank you in advance.

Can you be clearer about what days you have? Is this absence-only data?

It is presence only data, however I can artificially generate absence data also from randomly sampling the space and finding their covariates.

This type of data, at least in ecology, is so biased that you might as well show a 2d point plot and save everyone some time. Now that I got that off my chest:

In the context of a poisson process presence-only data contributes Pr(X >0) for each observation. You can code it in Stan as 1-poisson_lpmf(0|lambda) and add the ihpp part as usual.

It’s usually a terrible idea unless you have strong priors, or strong outside data, or a strong mechanism to build on. Stan is fantastic for building or evaluating a footgun so good luck!

For reference:

Thank you for the advice much appreciated.

1 Like

That’s a very kind response to advice you didn’t ask for! With ocean-sampling data you sometimes can construct a reasonable proxy for effort as a function of space based on external data (catch per unit effort and logs of effort by spatial location) and you could reasonably use that to resample for artificial absences.

I’m still doubting whether you could do better than a plot in terms of extracting covariates or anything like that :)

1 Like

ok thank you

I do not agree with this statement.

Now that I’ve got that off my chest: Specifically for this type of data, I personally wouldn’t use Stan. (It’s not flexible enough to efficiently fit the types of models you should use for this sort of data). I would use this software and recommend reading this paper, which talks explicitly about ways of taking the sampling design into account. (The software implements that model and more. See the doc).

1 Like

Thanks Daniel, very useful input. On a quick scan of the paper it looks like something in the right direction.

1 Like

Can you share a paper that you think represents a particularly useful application?

I did.


Transects are hardly “presence-only” data. They give you a direct measurement of how much effort was expended. I think we’re talking past each other here. I’m familiar with the literature where people try to use positive observations only when nobody bothered to record where sampling effort was expended or how heterogeneous it was. Transects I’m fine with, dido with designs that record how much effort was expended in other ways.

Even people who work with MaxEnt typically do more than that. They just use the distribution of “pseudo-absences” as an “alternative” to explicitly considering sample design.

It would be fascinating to see data on what people do. Both at ESA and informally I saw a lot of
people treating presence-only-data methods as some sort of magic much like the early response to state-space models with unobserved states.

Sure, and in my experience they generally treat the generation of pseudo-absences as a nuissance and don’t give it much attention. The results are probably pretty insensitive to it if you’re looking at abundance estimates or something like that but often what ecologists want are effects of spatio-temporally varying covariates.

What would you need in Stan to make you change your mind? Is it low-level control over sparsity or high-level interfaces to map/data stuff or both or something else? I can bug you about this in person tomorrow!

1 Like

Quite a lot of things! These are one of my goal models.

Things that aren’t currently in Stan:

  • sparse precision parameterisation of the normal )or FFT Normal
  • 1D/2D numerical integration (for evaluation the likelihood)
  • non-diagonal adaptation (decorrelating based on the prior + diagonal
    adaptation won’t be good enough)
  • ideally a version of RMHMC that doesn’t compute functions of dense
    matrices, which doesn’t scale [realistic version of both of these probably
    need a lot more user input into the allowable adaptations of the mass
  • to do this on large problems, the linear algebra will probably need to be

Even with all of that, the INLABru package is specifically designed for
these models, so it should be much easier to use than trying to make stan
do it (especially things like the integrations)

1 Like

Even with all of that, the INLABru package is specifically designed for these models

I’m surprised that your list doesn’t have more of a Laplace approximation feel to it? Especially if something called INLABru does so well with these models?

Is the Laplace approximation hidden in one of these things, or are you talking solving these problems another way?

Those are the component’s INLA using that we’d need to use in order to have a chance at fitting these with ( R )HMC.

NONMEM is also using block diagonal mass matrices—don’t know how well it’s working for them, but it’s an alternative to dense or generically sparse.

We have non-diagonal adaptation, but it’s both hard to fit and then even more brittle to varying posterior curvature.

[edit: Really, Discourse? I meant “( R )HMC” without the spaces, but no idea how to turn off the markdown expander that turns “(R)” into ® without changing fonts.]

How or where or why to implement Laplace approximations in Stan is a different question.

We’ve had some back and forth about it, but I don’t think it’s landed anywhere yet (except for an acknowledgement that they work well for some models and poorly for others, so they are not like the MCMC component of Stan but more like the ADVI component [although we know a lot more about their limitations]).

The roadmap to this (wherever it leads) needs to go through sparse cholesky factorisations and exact maginalisation of the latent gaussian component in lmer-type functions. Then it’s to get GMO to work properly. Then it’s to see how laplace approximations play with Stan.

1 Like