inlabru-org / inlabru

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

Feature: distance sampling for Poisson #209

Closed dmi3kno closed 1 year ago

dmi3kno commented 1 year 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 1 year 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.