wpeterman / ResistanceGA

Optimize resistance surfaces using Genetic Algorithms
36 stars 15 forks source link

Continuous raster optimisation results in homogenous resistance layer with values of 1 #11

Closed jamesryan1896 closed 4 years ago

jamesryan1896 commented 4 years ago

I am running ResistanceGA on Windows 10 in Rstudio, using R version 3.6.1 optimising with Circuitscape v4.0.5. I am using the following code to optimsie; code

I have tried to optimise an elevation raster using the monomolecular transformation however the resulting transformation at the end looks like this; transformation

It is ends up with an almost identical AIC value and a slighty worse AICc value than the distance model, presumably because it becomes the same layer with additional k parameters. Do you know why I may be gettig such an output rather than something that more closely follows the transfomation I tried to apply?

The raster I am using looks like this; raster

Thank you for taking the time to read my issue, James

wpeterman commented 4 years ago

Hi James--

Two thoughts. First, make sure that all of your sample points are within your landscape. It appears from the image that one point in the SE may be outside the boundary. Use the extract function from the raster package.

Second, it may be that isolation by distance is the process shaping genetic differentiation on your landscape. Assuming the optimization worked correctly, and it appears that it has, then the IBD model by itself is best supported as a simpler model than optimizing the elevation resistance surface to IBD.

jamesryan1896 commented 4 years ago

Ah sometimes Rstudio just positions my points off the raster even though they are definitely within the extent. You are correct, it did work perfectly and I understand where I've gone wrong, just needed to do some more investigating. Thank you for your time!