danlwarren / ENMTools

ENMTools R Package
101 stars 30 forks source link

Error in Warren's I Calculation #264

Closed abbycperkins closed 3 months ago

abbycperkins commented 3 months ago

Function raster.overlap calculates Warren's I as follows: I <- 1 - as.numeric(terra::global((sqrt(x) - sqrt(y))^2, "sum", na.rm = TRUE)/2)

Based on the equations presented in the Warren 2008 paper, this calculation should have an additional square root after the sum to achieve the Hellinger distance calcluation. Is there a reason I is being calculated differently in this function?

danlwarren commented 3 months ago

The original article has an error in the formula. There's a correction here:

https://onlinelibrary.wiley.com/doi/10.1111/j.1558-5646.2010.01204.x

abbycperkins commented 3 months ago

Thank you!

On Tue, Jun 25, 2024 at 5:14 PM Dan Warren @.***> wrote:

The original article has an error in the formula. There's a correction here:

https://onlinelibrary.wiley.com/doi/10.1111/j.1558-5646.2010.01204.x

— Reply to this email directly, view it on GitHub https://github.com/danlwarren/ENMTools/issues/264#issuecomment-2190061992, or unsubscribe https://github.com/notifications/unsubscribe-auth/BATKVJZTIYIV6PQ722LXH6DZJHTUDAVCNFSM6AAAAABJ4KOQC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJQGA3DCOJZGI . You are receiving this because you authored the thread.Message ID: @.***>

danlwarren commented 3 months ago

No worries!