Precipitation-weighting

24 views
Skip to first unread message

Scott Clem

unread,
Sep 20, 2022, 10:04:07 AM9/20/22
to IsoriX
Hi Alex,

As I was double checking my code and preparing to resubmit my manuscript on assigning origins of North American migratory hover flies, I realized my analysis may have a major flaw. This whole time I have not been using an amount-weighted precipitation isoscape. I believe that I should be doing this because I am indeed using North American precipitation data. I see from a post from last year (2021) that it was not yet possible to calibrate such an isoscape in IsoriX. Has this changed and is it possible to do this now?

Thank you,
Scott

Alexandre Courtiol

unread,
Sep 20, 2022, 2:26:33 PM9/20/22
to iso...@googlegroups.com
Hi Scott,

It is possible to build an amount-weighted precipitation isoscape and there are 2 ways for doing that.

You can do it in 2 or 3 lines of code if you take the easy road: performing the precipitation weighing before fitting the isoscape (i.e. when you aggregate the precipitation data) and then you could stick to the same workflow as you did.
This is how others are doing it too.
The subtle trick is to not forget to rise the weights to the square when averaging variances.
I realise that I do not show how to do that anywhere in the bookdown, so I will try to add that in it tomorrow!

The other way is to weigh after fitting different monthly isoscapes. I did code this up to the production of isoscape but that is quite complex when considering the calibration and I still have not looked into it... so this is not done indeed.

Take home message: if building isoscape for performing assignments, stick to the first method (and I will show you how to do it tomorrow).

Whether weighting by precipitation before or after fitting is best... I think that no one knows...













--
You received this message because you are subscribed to the Google Groups "IsoriX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isorix+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isorix/5c89bf65-ddd8-47b2-a11a-e4f9594af660n%40googlegroups.com.


--
Alexandre Courtiol, www.datazoogang.de

Scott Clem

unread,
Sep 21, 2022, 12:40:17 PM9/21/22
to IsoriX
Excellent, thank you Alex. This will be very helpful. If I am understanding this correctly, though, even if I build this precipitation-weighted isoscape I will be unable to calibrate it and thus unable to perform assignments on my flies using IsoriX?

Thanks,
Scott

Alexandre Courtiol

unread,
Sep 21, 2022, 2:43:38 PM9/21/22
to IsoriX
Dear Scott,
You got it wrong: you will be able to do the calibration and perform the assignments using the precipitation weighted isoscape.
Pedantic note: we don't speak of "calibrating the isoscape" in IsoriX, instead IsoriX calibrates the samples to assign (it turns sample into precipitation and not the reverse).
I am running late here, so not sure I will finish today (and teaching most of the next 2 days) but I will let you know when it is done (ETA between a few hours and a few days).
Alex

Scott Clem

unread,
Sep 21, 2022, 2:46:33 PM9/21/22
to IsoriX
Okay awesome, thank you Alex. This is a relief. I look forward to your response.

Alexandre Courtiol

unread,
Sep 26, 2022, 5:01:20 AM9/26/22
to IsoriX
Dear Scott,

I have drafted in the bookdown a section about how to do the precipitation weighting by hand waiting for this to be dealt with more automatically in the package. It is work in progress and things may change in the future but since I know you are on a tight deadline, you can already check it out: https://bookdown.org/content/782/advanced.html#weighted

Best,

Alex

Scott Clem

unread,
Sep 28, 2022, 10:35:21 AM9/28/22
to IsoriX
Dear Alex,

Thank you so much for doing all this! Your efforts have been extremely helpful and have made my life much easier. This seems to have worked. My results didn't change much except my assignments seem to have shifted a little further north. In some cases individuals are estimated to originate north of their known distribution, so I must attribute this to some sort of unaccounted variation. The group assignments, I think, help correct for this by averaging things out.

Just curious, do you have thoughts on providing more robust metrics for distance flown? So far I've just used arbitrary estimates. I tried adding the maximum, but this places the origins of flies in places I do not believe to be correct (i.e. west of the species' bulk range).

Sincerely,
Scott

Alexandre Courtiol

unread,
Sep 29, 2022, 9:13:40 AM9/29/22
to IsoriX
Hi Scott,
I am very busy till Tuesday (drafting a grant), and there may be some changes to be done about precipitation weighting (the question is what the variance should capture... it is tricky and a discussion in progress I am having with F.R. but we should have soon something to tell you).
About distance flown: only the grey area can be excluded (with reasonable certainty) -- within that you cannot tell.
So you could extract all raster cells that qualify (i.e. those with p-value > 0.05, within the distribution of the species) and compute summary metrics (mean, sd, range...).
I would not use just the most likely single location.
If you don't know how to, this will have to wait for the grant being nailed.
Sorry.

Scott Clem

unread,
Sep 30, 2022, 4:51:28 PM9/30/22
to IsoriX
Hi Alex,

Thank you, this makes sense. I would like to try to better quantify a distance. If you get a chance to send this code at some point, that would be helpful. I've already resubmitted the manuscript, but it is possible I could still include some numbers from this assessment. Good luck submitting your grant!

Cheers,

Scott
Reply all
Reply to author
Forward
0 new messages