inlabru-org / inlabru

inlabru
https://inlabru-org.github.io/inlabru/
73 stars 21 forks source link

Feature: distance sampling for Poisson #209

Closed dmi3kno closed 9 months ago

dmi3kno commented 9 months ago

I am trying to implement the model, where I have the aggregated counts on a grid. Some counts are low (or even missing) because they are undersampled. I wanted to implement a distance sampling algorithm, but then I discovered that samplers argument is only defined for family="cp".

Literature:

How do I adjust for "distance to road" if I have total counts per pixel? I could, of course, turn my Pixel counts into an LGCP by uniformly distributing the points within each cell, but it feels wrong to do so.

Here's an example of implementation in INLA

finnlindgren commented 9 months ago

If you precompute the "distance to road" at the grid locations and add them as distance in the data data.frame, you can use them in the predictor expression in the same way as in the transect distance sampling case.

formula <- observed_counts ~ some + component + combination + log_detection_probability(dist, some, parameters)

The cp model uses domain and samplers to call fm_int(domain = domain, samplers = samplers), but in your case you already have all the required information, so there's no need to create any extra integration points.