Error using predict(FitList) on new data

50 views
Skip to first unread message

Airy González

unread,
Jul 4, 2024, 8:47:18 PM7/4/24
to unma...@googlegroups.com
Hi all,
I am trying to do model averaging on two models, and I want to use predict() on raster data. Is it possible? I am getting the error below, but I don't know what it means. Raster seems to have the same dimensions. What does it means?

Screenshot 2024-07-04 at 6.43.32 PM.png

Screenshot 2024-07-04 at 6.44.42 PM.png

Screenshot 2024-07-04 at 6.45.16 PM.png
Screenshot 2024-07-04 at 6.44.59 PM.png
--
Airy Adriana Peralta
Ph. D. Candidate & Professional Aide
Ecology and Evolutionary Biology
Institute of Arctic and Alpine Research - CU Boulder

Ken Kellner

unread,
Jul 5, 2024, 7:38:29 AM7/5/24
to unmarked
Looks like it's probably a bug. Can you package up the raster stack and fitList and send to me (off-list) as an .Rdata so I can take a closer look?

In the meantime you should be able to work around this by converting the raster stack values into a data frame (with as.data.frame), predicting with this data frame as normal, and then inserting the results back into a new raster.

Ken

Ken Kellner

unread,
Jul 7, 2024, 10:00:05 AM7/7/24
to unmarked
There was a bug with predicting from rasters using a fitList. It should be fixed now in the dev version of the package. You can install it with

remotes::install_github("rbchan/unmarked")
Reply all
Reply to author
Forward
0 new messages