I want to generate pseudo absences based on kernel density estimate from a linear feature spatial line layer, where pseudo absences have a higher probability of being sampled near a line.

I have tried to do this using the pseudo.absence function in the spatialEco package; however, the input pattern has to be a point pattern and I don't see how to specify a bandwidth parameter for the KDE, which I would like to do.

I tried using spatstat to create a density.psp, which I did successfully and am happy with that output, but I cannot figure out how to generate pseudo-absence points based on the KDE.

My bootleg solution was to use the spsample function in sp to create points along my line features and then use that as the point pattern input to the pseudo.absence function. This seems to work; however, I want the sample of points to be based on the inverse of the KDE output from the function.

Is there a way to do this within spatialEco?

  • In the pseudo.absence function you can pass an explicit bandwidth value to the sigma argument. – Jeffrey Evans May 29 at 21:47
  • Thanks! I thought it had to be one of the explicit character arguments in the documentation (e.g, "Diggle", "Scott") and did not realize that it would just take a bandwidth argument. Any ideas on how to have the the function generate the pseudo absences on (1-kde) or will I have to feed the call an 'inverse' point pattern from what I have (if that is a thing)? – Matt May 30 at 11:07
  • I will clarify this in the help document. The entire point of the function is that it does produce pseudoabsence data so, no need to perform additional manipulation of the results. Take a look at the results in the help's example usage. Please also be aware of the gradient argument. This allows for a relaxation of weights thus, allowing for lesser or greater spatial proximity of the resulting null. The default is a neutral effect but if you have a species that is more of a generalist you may want to introduce a degree of noise into the null. This can avoid a hard boundary problem in your model – Jeffrey Evans May 30 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.