SCM

Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: Manual pseudo-absence selection [ Reply ]
By: Maya Guéguen on 2023-04-17 07:15
[forum:49638]
Hello Treen,

biomod2 is now completely developed and managed on github.
We try to gather all issues there as well, to facilitate our maintenance job, and so other users can also check if they have the same questions / issues.
Please repost your question here : https://github.com/biomodhub/biomod2/issues
and we will answer you as fast as possible.

Maya

Manual pseudo-absence selection [ Reply ]
By: Treen Perano on 2023-04-12 19:41
[forum:49637]
I have used BIOMOD2 about a year ago, but it seems like it has changed a lot recently... Many things have been renamed and restructured it seems.

Previously, I used to have a rasterstack, together with a CSV consisting of three columns containing presence data (lon, lat, and "1"), and pseudo-absence data (lon, lat, and "NA).

It seems that this does not work anymore? When trying to run the BIOMOD_modeling function I get the error
Error in { : task 1 failed - "missing value where TRUE/FALSE needed"

I have looked at the vignette, and I do see that there is still the option to define pseudo-absences, but the process behind this is explained in a way that is unclear to me:
if I understand correctly I have to create a 'user.table' in the bm.PseudoAbsences function which is described as;

If strategy = 'user.defined', a matrix or data.frame with as many rows
as resp.var values, as many columns as nb.rep, and containing TRUE or FALSE
values defining which points will be used to build the species distribution model(s)
for each repetition.

I can feed it the subset dataframe of the NA values in the csv, but what is meant by 'as many rows as resp.var values, as many columns as nb.rep, and containing TRUE or FALSE?'
There are only two response variables? 1 (presence) or NA (Pseudo-absence), so then it'd be two rows? Why would it need to contain TRUE or FALSE when I am defining pseudo-absences only?

So I'm quite confused. Is there an easy way to deal with this in the updated biomod2, or perhaps a way to use the older version of biomod2?

Thanks to:
Vienna University of Economics and Business Powered By FusionForge