mapping with community models

37 views
Skip to first unread message

Magdalena Salas

unread,
Dec 17, 2024, 1:30:39 PM12/17/24
to camtrapR
Hi Juergen, I hope you're doing well. I was wondering if it's possible to map the occupancy predicted by the MOMS. I was able to get the table with predicted values for camera stations (mean and sd) but I don't know if it can estimate predicted values for points in a raster. I think this a key step, and the only way to generate this kind of map in R (with package raster and sf).

When working with single-season occupancy models, I used this predict function with the data frame being the points extracted from the raster (in this case, "alt" and " pend" are variables):

occ_predavg <- predict(MMod139,
                       newdata = as.data.frame (pred_surface_std[,c("alt",
                                                                    "Pend")]), type = "state")


Thank you very much in advance.

Best,
Magdalena

Juergen Niedballa

unread,
Dec 21, 2024, 5:33:49 PM12/21/24
to camtrapR
Hello,
yes, you can create prediction maps for multi-species occupancy models, using the predict() function (as defined by camtrapR), see:

 ?camtrapR::predict

It allows the creation of species occupancy and species richness maps (mean, SD, confidence intervals). For Royle-Nichols models it also calculates abundance. In addition it can calculate percentage of area occupied (PAO), which does not return maps though.

See the vignette under "Spatial predictions":

On a side note, in single species models from unmarked (and ubms) you can predict directly on rasters (or terra SpatRast objects), so no need to convert the raster to a data frame first.
Best regards,
Jürgen
Reply all
Reply to author
Forward
0 new messages